Adobe Illustrator CS4 Type Library JS: Document

Illustrator CS4

Class

Document

 A document.

QuickLinks

activate, close, exportFile, exportPDFPreset, exportPrintPreset, exportVariables, imageCapture, importCharacterStyles, importPDFPreset, importParagraphStyles, importPrintPreset, importVariables, print, rasterize, save, saveAs, windowCapture

Hierarchy

Object
Document

Properties

PropertyTypeAccessDescription
XMPStringstring r/wThe XMP packet string associated with the document.
activeDataSetDataSet r/wThe active data set.
activeLayerLayer r/wThe active layer.
activeViewView readonlyThe document's current view.
artboardsArtboards readonlyAll artboards in the document.
brushesBrushes readonlyThe brushes defined in this document.
characterStylesCharacterStyles readonlyThe list of character styles in this document.
compoundPathItemsCompoundPathItems readonlyThe compound path artwork in this collection.
cropBoxRect r/w
cropStyleCropOptions:
CropOptions.Standard
CropOptions.Japanese
r/w
dataSetsDataSets readonlyThe data sets defined in this document.
defaultFillColorColor r/wDefault fill color.
defaultFillOverprintbool r/wWill art beneath a filled object be overprinted by default?
defaultFilledbool r/wShould a new path be filled?
defaultStrokeCapStrokeCap:
StrokeCap.BUTTENDCAP
StrokeCap.ROUNDENDCAP
StrokeCap.PROJECTINGENDCAP
r/wDefault type of line capping.
defaultStrokeColorColor r/wDefault stroke color.
defaultStrokeDashOffsetnumber r/wThe default distance into the dash pattern at which the pattern should be started.
defaultStrokeDashes Array of number r/wDefault dash lengths (set to {} for a solid line)
defaultStrokeJoinStrokeJoin:
StrokeJoin.MITERENDJOIN
StrokeJoin.ROUNDENDJOIN
StrokeJoin.BEVELENDJOIN
r/wDefault type of joints.
defaultStrokeMiterLimitnumber r/wSpecifies whether a join is mitered (pointed) or beveled (squared-off) by default.
defaultStrokeOverprintbool r/wWill art beneath a stroked object be overprinted by default?
defaultStrokeWidthnumber r/wDefault width of stroke.
defaultStrokedbool r/wShould a new path be stroked?
documentColorSpaceDocumentColorSpace:
DocumentColorSpace.RGB
DocumentColorSpace.CMYK
readonlyThe color space used for the document.
fullNameFile readonlyThe file associated with the document.
geometricBoundsRect readonlyThe bounds of the illustration excluding stroke width.
gradientsGradients readonlyThe gradients available in this document.
graphItemsGraphItems readonlyThe graph art items in this document.
graphicStylesArtStyles readonlyThe graphic styles defined in this document.
groupItemsGroupItems readonlyThe group items in this document.
heightnumber readonly
inkList Array of Ink readonlyThe list of inks in this document.
kinsokuSet Array of string readonlyThe Kinsoku set.
layersLayers readonlyThe layers in this document.
legacyTextItemsLegacyTextItems readonlyThe text frame items in this story.
meshItemsMeshItems readonlyThe mesh art items in this document.
mojikumiSet Array of string readonlyThe Mojikumi set.
namestring readonlyThe document's name.
nonNativeItemsNonNativeItems readonlyThe non-native art items in this document.
outputResolutionnumber readonly
pageItemsPageItems readonlyAll the artwork in this document.
pageOriginPoint r/w
paragraphStylesParagraphStyles readonlyThe list of paragraph styles in this document.
parentObject readonlyThe object's container.
pathFile readonlyPath specification for the document.
pathItemsPathItems readonlyThe path artwork in this document.
patternsPatterns readonlyThe patterns available in this document.
placedItemsPlacedItems readonlyThe placed art items in this document.
pluginItemsPluginItems readonlyThe plugin art items in this document.
printTilesbool readonly
rasterEffectSettingsRasterEffectOptions r/wThe document raster effects settings.
rasterItemsRasterItems readonlyThe raster art items in this document.
rulerOriginPoint r/w
rulerUnitsRulerUnits:
RulerUnits.Unknown
RulerUnits.Inches
RulerUnits.Centimeters
RulerUnits.Points
RulerUnits.Picas
RulerUnits.Millimeters
RulerUnits.Qs
RulerUnits.Pixels
readonly
savedbool r/wHas the document been saved?
selectionany r/wThe selection within the document.
showPlacedImagesbool readonly
splitLongPathsbool readonly
spotsSpots readonlyThe custom spot colors available in this document.
stationerybool readonlyIs the file a stationery file?
storiesStories readonlyThe story items in this document.
swatchGroupsSwatchGroups readonlyThe Swatch Groups in this document.
swatchesSwatches readonlyThe swatches in this document.
symbolItemsSymbolItems readonlyThe symbol items in this document.
symbolsSymbols readonlyThe symbols defined in this document.
tagsTags readonlyThe tags in this document.
textFramesTextFrameItems readonlyThe text frame items in this document.
tileFullPagesbool readonly
typenamestring readonlyThe class name of the object.
useDefaultScreenbool readonly
variablesVariables readonlyThe variables defined in this document.
variablesLockedbool r/wThe locked variables.
viewsViews readonlyThe views in this document.
visibleBoundsRect readonlyThe visible bounds of the illustration including stroke width.
widthnumber readonly

Methods

Instances

void activate ()
Activate the first window associated with the document.

void close ([saving: SaveOptions])
Close the specified document(s)

ParameterTypeDescription
savingSaveOptions:
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)

ParameterTypeDescription
exportFileFileThe file to export the document to.
exportFormatExportType:
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.

ParameterTypeDescription
fileFileFile to export to.

void exportPrintPreset (file: File)
Export the current print setting to the preset file.

ParameterTypeDescription
fileFileFile to export to.

void exportVariables (file: File)
Save datasets into an XML library. The datasets contain variables and their associated dynamic data.

ParameterTypeDescription
fileFileFile 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.

ParameterTypeDescription
imageFileFileThe file to which the captured image should be written.
clipBoundsRectThe rectangular region of the artwork for image capture. If the parameter is omitted, the entire artwork bound is captured. (Optional)
optionsImageCaptureOptionsDescribes the image capture options. (Optional)

void importCharacterStyles (fileSpec: File)
Load the character styles from the Illustrator file.

ParameterTypeDescription
fileSpecFileFile spec to import from.

void importPDFPreset (fileSpec: File[, replacingPreset: bool=false])
Load all PDF presets from a file.

ParameterTypeDescription
fileSpecFileFile to import from.
replacingPresetboolShould existing editable presets be replaced? (default: false) (Optional)

void importParagraphStyles (fileSpec: File)
Load the paragraph styles from the Illustrator file.

ParameterTypeDescription
fileSpecFileFile spec to import from.

void importPrintPreset (printPreset: string, fileSpec: File)
Apply the named print preset from the file to the current print setting.

ParameterTypeDescription
printPresetstringThe name of a print preset to import.
fileSpecFileFile 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.

ParameterTypeDescription
fileSpecFileFile spec to import from.

void print ([options: PrintOptions])
Print the document.

ParameterTypeDescription
optionsPrintOptionsPrint 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.

ParameterTypeDescription
sourceArt any The page item(s) to be rasterized.
clipBoundsRectThe rectangular region of the artwork for the rasterization. If the parameter is omitted, the bounds of the source art(s) is used instead. (Optional)
optionsRasterizeOptionsDescribes the rasterization options. (Optional)

void save ()
Save the document.

void saveAs (saveIn: File[, options: any])
Save the document with specific save options.

ParameterTypeDescription
saveInFileThe 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.

ParameterTypeDescription
imageFileFileThe TIFF file to which the captured image should be written.
windowSizePointThe 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.3dContents :: Index