Documents

A collection of documents.

Methods:

add, addDocument, addDocumentWithDialogOption, arrange, 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 add ([documentColorSpace:DocumentColorSpace=DocumentColorSpace], [width:Number=Number], [height:Number=Number], [numArtboards:Int32=Int32], [artboardLayout:DocumentArtboardLayout=DocumentArtboardLayout], [artboardSpacing:Number=Number], [artboardRowsOrCols:Int32=Int32])

A document.

Parameter

Type

Description

documentColorSpace

DocumentColorSpace

DocumentColorSpace.CMYK

DocumentColorSpace.RGB

The color model used for the document.

(default: DocumentColorSpace.CMYK)

width

Number

Width of the artboard.

(default: 612.0)

height

Number

Height of the artboard.

(default: 792.0)

numArtboards

Int32

Number of artboards for new document.Range (1:100).

(default: 1)

artboardLayout

DocumentArtboardLayout

DocumentArtboardLayout.Column

DocumentArtboardLayout.GridByCol

DocumentArtboardLayout.GridByRow

DocumentArtboardLayout.RLGridByCol

DocumentArtboardLayout.RLGridByRow

DocumentArtboardLayout.RLRow

DocumentArtboardLayout.Row

Layout of artboards for new document.

(default: DocumentArtboardLayout.GridByRow)

artboardSpacing

Number

Spacing between artboards for new document.

(default: 20.0)

artboardRowsOrCols

Int32

Number of rows (for rows layout) OR column(for column layouts)of artboards.Range is 1 to (docNumArtboards - 1) or 1 for single row or column layouts.

(default: 1)

Document addDocument (startupPreset:String, [presetSettings:DocumentPreset], [showOptionsDialog:Boolean])

Create a new document from a preset.

Parameter

Type

Description

startupPreset

String

The name of a startup document preset.

presetSettings

DocumentPreset

Custom settings to apply to the preset.

showOptionsDialog

Boolean

If false, do not show Options dialog.

Document addDocumentWithDialogOption (startupPreset:String, [showOptionsDialog:Boolean])

Create a document from the preset with option to throw dialog to customize present settings.

Parameter

Type

Description

startupPreset

String

The name of startup document preset.

showOptionsDialog

Boolean

Argument controls if options Dialog is shown or not.

Boolean arrange (layoutStyle:DocumentLayoutStyle)

Arranges the documents in the specified style.

Parameter

Type

Description

layoutStyle

DocumentLayoutStyle

DocumentLayoutStyle.CASCADE

DocumentLayoutStyle.CONSOLIDATEALL

DocumentLayoutStyle.FLOATALL

DocumentLayoutStyle.HORIZONTALTILE

DocumentLayoutStyle.VERTICALTILE

The document layout style.

Document getByName (name:String)

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

Parameter

Type

Description

name

String

 

Object of

Application.documents