Documents

A collection of documents.

Methods:

add, getByName, []

Property Listing

Property

Type

Access

Description

length

Int

readonly

Number of elements in the collection.

parent

 

readonly

The object's container.

typename

String

readonly

The class name of the object.

Method Listing

Document [] (index:Uint)

Get an element in the collection with the provided index.

Parameter

Type

Description

index

Uint

 

Document add ([width:UnitValue], [height:UnitValue], [resolution:Number=Number], [name:String], [mode:NewDocumentMode=NewDocumentMode], [initialFill:DocumentFill=DocumentFill], [pixelAspectRatio:Number=Number], [bitsPerChannel:BitsPerChannelType=BitsPerChannelType], [colorProfileName:String])

A document.

Parameter

Type

Description

width

UnitValue

The width of the document.

height

UnitValue

The height of the document.

resolution

Number

The resolution of the document (in pixels per inch)

(default: 72)

name

String

The name of the document.

mode

NewDocumentMode

NewDocumentMode.GRAYSCALE

NewDocumentMode.RGB

NewDocumentMode.CMYK

NewDocumentMode.LAB

NewDocumentMode.BITMAP

The document mode.

(default: NewDocumentMode.RGB)

initialFill

DocumentFill

DocumentFill.WHITE

DocumentFill.BACKGROUNDCOLOR

DocumentFill.TRANSPARENT

The initial fill of the document.

(default: DocumentFill.WHITE)

pixelAspectRatio

Number

The initial pixel aspect ratio of the document.

(default: 1.0)

bitsPerChannel

BitsPerChannelType

BitsPerChannelType.ONE

BitsPerChannelType.EIGHT

BitsPerChannelType.SIXTEEN

BitsPerChannelType.THIRTYTWO

The number of bits per channel.

(default: BitsPerChannelType.EIGHT)

colorProfileName

String

The name of color profile for document.

Document getByName (name:String)

Get the first element in the collection with the provided name.

Parameter

Type

Description

name

String

 

Object of

Application.documents