Adobe Photoshop CS5 Object Library JS: Documents

Photoshop CS5

Class

Documents

 A collection of documents.

See also Document.

QuickLinks

[], add, getByName

Hierarchy

Object
Documents

Properties

PropertyTypeAccessDescription
lengthint readonlyNumber of elements in the collection.
parentObject readonlyThe object's container.
typenamestring readonlyThe class name of the object.

Methods

Instances

Document [] (index: uint)
Get an element in the collection with the provided index.

ParameterTypeDescription
indexuint

Document add ([width: UnitValue][, height: UnitValue][, resolution: number=72][, name: string][, mode: NewDocumentMode=NewDocumentMode.RGB][, initialFill: DocumentFill=DocumentFill.WHITE][, pixelAspectRatio: number=1.0][, bitsPerChannel: BitsPerChannelType=BitsPerChannelType.EIGHT][, colorProfileName: string])
A document.

ParameterTypeDescription
widthUnitValueThe width of the document. (Optional)
heightUnitValueThe height of the document. (Optional)
resolutionnumberThe resolution of the document (in pixels per inch) (default: 72) (Optional)
namestringThe name of the document. (Optional)
modeNewDocumentMode:
NewDocumentMode.GRAYSCALE
NewDocumentMode.RGB
NewDocumentMode.CMYK
NewDocumentMode.LAB
NewDocumentMode.BITMAP
The document mode. (default: NewDocumentMode.RGB) (Optional)
initialFillDocumentFill:
DocumentFill.WHITE
DocumentFill.BACKGROUNDCOLOR
DocumentFill.TRANSPARENT
The initial fill of the document. (default: DocumentFill.WHITE) (Optional)
pixelAspectRationumberThe initial pixel aspect ratio of the document. (default: 1.0) (Optional)
bitsPerChannelBitsPerChannelType:
BitsPerChannelType.ONE
BitsPerChannelType.EIGHT
BitsPerChannelType.SIXTEEN
BitsPerChannelType.THIRTYTWO
The number of bits per channel. (default: BitsPerChannelType.EIGHT) (Optional)
colorProfileNamestringThe name of color profile for document. (Optional)

Document getByName (name: string)
Get the first element in the collection with the provided name.

ParameterTypeDescription
namestring

Element of

Application.documents

Jongware, 28-Aug-2012 v3.0.3iContents :: Index