Document
QuickLinks
Hierarchy
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| XMPString | string | r/w | The XMP packet string associated with the document. |
| activeDataSet | DataSet | r/w | The active data set. |
| activeLayer | Layer | r/w | The active layer. |
| activeView | View | readonly | The document's current view. |
| artboards | Artboards | readonly | All artboards in the document. |
| brushes | Brushes | readonly | The brushes defined in this document. |
| characterStyles | CharacterStyles | readonly | The list of character styles in this document. |
| compoundPathItems | CompoundPathItems | readonly | The compound path artwork in this collection. |
| cropBox | Rect | r/w | |
| cropStyle | CropOptions: CropOptions.Standard CropOptions.Japanese |
r/w | |
| dataSets | DataSets | readonly | The data sets defined in this document. |
| defaultFillColor | Color | r/w | Default fill color. |
| defaultFillOverprint | bool | r/w | Will art beneath a filled object be overprinted by default? |
| defaultFilled | bool | r/w | Should a new path be filled? |
| defaultStrokeCap | StrokeCap: StrokeCap.BUTTENDCAP StrokeCap.ROUNDENDCAP StrokeCap.PROJECTINGENDCAP |
r/w | Default type of line capping. |
| defaultStrokeColor | Color | r/w | Default stroke color. |
| defaultStrokeDashOffset | number | r/w | The default distance into the dash pattern at which the pattern should be started. |
| defaultStrokeDashes | Array of number | r/w | Default dash lengths (set to {} for a solid line) |
| defaultStrokeJoin | StrokeJoin: StrokeJoin.MITERENDJOIN StrokeJoin.ROUNDENDJOIN StrokeJoin.BEVELENDJOIN |
r/w | Default type of joints. |
| defaultStrokeMiterLimit | number | r/w | Specifies whether a join is mitered (pointed) or beveled (squared-off) by default. |
| defaultStrokeOverprint | bool | r/w | Will art beneath a stroked object be overprinted by default? |
| defaultStrokeWidth | number | r/w | Default width of stroke. |
| defaultStroked | bool | r/w | Should a new path be stroked? |
| documentColorSpace | DocumentColorSpace: DocumentColorSpace.RGB DocumentColorSpace.CMYK |
readonly | The color space used for the document. |
| fullName | File | readonly | The file associated with the document. |
| geometricBounds | Rect | readonly | The bounds of the illustration excluding stroke width. |
| gradients | Gradients | readonly | The gradients available in this document. |
| graphItems | GraphItems | readonly | The graph art items in this document. |
| graphicStyles | ArtStyles | readonly | The graphic styles defined in this document. |
| groupItems | GroupItems | readonly | The group items in this document. |
| height | number | readonly | |
| inkList | Array of Ink | readonly | The list of inks in this document. |
| kinsokuSet | Array of string | readonly | The Kinsoku set. |
| layers | Layers | readonly | The layers in this document. |
| legacyTextItems | LegacyTextItems | readonly | The text frame items in this story. |
| meshItems | MeshItems | readonly | The mesh art items in this document. |
| mojikumiSet | Array of string | readonly | The Mojikumi set. |
| name | string | readonly | The document's name. |
| nonNativeItems | NonNativeItems | readonly | The non-native art items in this document. |
| outputResolution | number | readonly | |
| pageItems | PageItems | readonly | All the artwork in this document. |
| pageOrigin | Point | r/w | |
| paragraphStyles | ParagraphStyles | readonly | The list of paragraph styles in this document. |
| parent | Object | readonly | The object's container. |
| path | File | readonly | Path specification for the document. |
| pathItems | PathItems | readonly | The path artwork in this document. |
| patterns | Patterns | readonly | The patterns available in this document. |
| placedItems | PlacedItems | readonly | The placed art items in this document. |
| pluginItems | PluginItems | readonly | The plugin art items in this document. |
| printTiles | bool | readonly | |
| rasterEffectSettings | RasterEffectOptions | r/w | The document raster effects settings. |
| rasterItems | RasterItems | readonly | The raster art items in this document. |
| rulerOrigin | Point | r/w | |
| rulerUnits | RulerUnits: RulerUnits.Unknown RulerUnits.Inches RulerUnits.Centimeters RulerUnits.Points RulerUnits.Picas RulerUnits.Millimeters RulerUnits.Qs RulerUnits.Pixels |
readonly | |
| saved | bool | r/w | Has the document been saved? |
| selection | any | r/w | The selection within the document. |
| showPlacedImages | bool | readonly | |
| splitLongPaths | bool | readonly | |
| spots | Spots | readonly | The custom spot colors available in this document. |
| stationery | bool | readonly | Is the file a stationery file? |
| stories | Stories | readonly | The story items in this document. |
| swatchGroups | SwatchGroups | readonly | The Swatch Groups in this document. |
| swatches | Swatches | readonly | The swatches in this document. |
| symbolItems | SymbolItems | readonly | The symbol items in this document. |
| symbols | Symbols | readonly | The symbols defined in this document. |
| tags | Tags | readonly | The tags in this document. |
| textFrames | TextFrameItems | readonly | The text frame items in this document. |
| tileFullPages | bool | readonly | |
| typename | string | readonly | The class name of the object. |
| useDefaultScreen | bool | readonly | |
| variables | Variables | readonly | The variables defined in this document. |
| variablesLocked | bool | r/w | The locked variables. |
| views | Views | readonly | The views in this document. |
| visibleBounds | Rect | readonly | The visible bounds of the illustration including stroke width. |
| width | number | readonly |
Methods
Instances
void activate ()
Activate the first window associated with the document.
void close ([saving:
SaveOptions])
Close the specified document(s)
| Parameter | Type | Description |
|---|---|---|
| saving | SaveOptions: SaveOptions.SAVECHANGES SaveOptions.DONOTSAVECHANGES SaveOptions.PROMPTTOSAVECHANGES | Specifies whether changes should be saved before closing. (Optional) |
void exportFile (exportFile:
File, exportFormat:
ExportType[, options:
any])
Export the specified document(s)
| Parameter | Type | Description |
|---|---|---|
| exportFile | File | The file to export the document to. |
| exportFormat | ExportType: ExportType.JPEG ExportType.PHOTOSHOP ExportType.SVG ExportType.PNG8 ExportType.PNG24 ExportType.GIF ExportType.FLASH ExportType.AUTOCAD | The file type to export the document as. |
| options | any | Options for the file type specified. (Optional) |
void exportPDFPreset (file:
File)
Save all PDF presets to a file.
| Parameter | Type | Description |
|---|---|---|
| file | File | File to export to. |
void exportPrintPreset (file:
File)
Export the current print setting to the preset file.
| Parameter | Type | Description |
|---|---|---|
| file | File | File to export to. |
void exportVariables (file:
File)
Save datasets into an XML library. The datasets contain variables and their associated dynamic data.
| Parameter | Type | Description |
|---|---|---|
| file | File | File spec to export to. |
void imageCapture (imageFile:
File[, clipBounds:
Rect][, options:
ImageCaptureOptions])
Capture the artwork content inside the clip bound as raster image, and write out the captured image data into the target image file.
| Parameter | Type | Description |
|---|---|---|
| imageFile | File | The file to which the captured image should be written. |
| clipBounds | Rect | The rectangular region of the artwork for image capture. If the parameter is omitted, the entire artwork bound is captured. (Optional) |
| options | ImageCaptureOptions | Describes the image capture options. (Optional) |
void importCharacterStyles (fileSpec:
File)
Load the character styles from the Illustrator file.
| Parameter | Type | Description |
|---|---|---|
| fileSpec | File | File spec to import from. |
void importPDFPreset (fileSpec:
File[, replacingPreset:
bool=false])
Load all PDF presets from a file.
| Parameter | Type | Description |
|---|---|---|
| fileSpec | File | File to import from. |
| replacingPreset | bool | Should existing editable presets be replaced? (default: false) (Optional) |
void importParagraphStyles (fileSpec:
File)
Load the paragraph styles from the Illustrator file.
| Parameter | Type | Description |
|---|---|---|
| fileSpec | File | File spec to import from. |
void importPrintPreset (printPreset:
string, fileSpec:
File)
Apply the named print preset from the file to the current print setting.
| Parameter | Type | Description |
|---|---|---|
| printPreset | string | The name of a print preset to import. |
| fileSpec | File | File to import from. |
void importVariables (fileSpec:
File)
Import a library containing datasets, variables and their associated dynamic data. Importing variables will overwrite existing variables and datasets.
| Parameter | Type | Description |
|---|---|---|
| fileSpec | File | File spec to import from. |
void print ([options:
PrintOptions])
Print the document.
| Parameter | Type | Description |
|---|---|---|
| options | PrintOptions | Print options. (Optional) |
PageItem rasterize (sourceArt:
any[, clipBounds:
Rect][, options:
RasterizeOptions])
Rasterize the source art(s) within the specified clip bounds. The source art(s) are disposed as a result of the rasterization.
| Parameter | Type | Description |
|---|---|---|
| sourceArt | any | The page item(s) to be rasterized. |
| clipBounds | Rect | The rectangular region of the artwork for the rasterization. If the parameter is omitted, the bounds of the source art(s) is used instead. (Optional) |
| options | RasterizeOptions | Describes the rasterization options. (Optional) |
void save ()
Save the document.
void saveAs (saveIn:
File[, options:
any])
Save the document with specific save options.
| Parameter | Type | Description |
|---|---|---|
| saveIn | File | The file to save the document in. |
| options | any | Options for the file type specified. (Optional) |
void windowCapture (imageFile:
File, windowSize:
Point)
Capture the current document window to the target TIFF image file.
| Parameter | Type | Description |
|---|---|---|
| imageFile | File | The TIFF file to which the captured image should be written. |
| windowSize | Point | The size to make the window before capture. |
Element of
Application.activeDocument
Return
Document Application.open (file: File[, documentColorSpace: DocumentColorSpace][, options: any])
Document Documents.[] (index: uint)
Document Documents.add ([documentColorSpace: DocumentColorSpace=DocumentColorSpace.CMYK][, width: number=612.0][, height: number=792.0][, numArtboards: int=1][, artboardLayout: DocumentArtboardLayout=DocumentArtboardLayout.GridByRow][, artboardSpacing: number=20.0][, artboardRowsOrCols: int=1])
Document Documents.addDocument (startupPreset: string, presetSettings: DocumentPreset)
Document Documents.getByName (name: string)
| Jongware, 27-Jun-2010 v3.0.3d | Contents :: Index |