OpenOptions
OpenOptions
Section titled “OpenOptions”openOptions
Description
Section titled “Description”Options for opening a document, used with the Application.open() method.
Properties
Section titled “Properties”OpenOptions.convertCropAreaToArboard
Section titled “OpenOptions.convertCropAreaToArboard”openOptions.convertCropAreaToArboard
Description
Section titled “Description”Optional. Convert crop areas to artboards when opening a legacy document in Illustrator CS4 or later. When false
, crop areas are discarded.
Default: true
.
Boolean.
OpenOptions.convertTilesToArboard
Section titled “OpenOptions.convertTilesToArboard”openOptions.convertTilesToArboard
Description
Section titled “Description”Optional. Convert print tiles to artboards when opening a legacy document in Illustrator CS4 or later.
Default: false
.
Boolean.
OpenOptions.createArtboardWithArtworkBoundingBox
Section titled “OpenOptions.createArtboardWithArtworkBoundingBox”openOptions.createArtboardWithArtworkBoundingBox
Description
Section titled “Description”Optional. Create an artboard with the dimensions of the bounding box of the artwork when opening a legacy document in Illustrator CS4 or later.
Default: false
.
Boolean.
OpenOptions.openAs
Section titled “OpenOptions.openAs”openOptions.openAs
Description
Section titled “Description”Optional. Open the file as an Illustrator library of this type.
Default: LibraryType.IllustratorArtwork
.
OpenOptions.preserveLegacyArtboard
Section titled “OpenOptions.preserveLegacyArtboard”openOptions.preserveLegacyArtboard
Description
Section titled “Description”Optional. Preserve legacy artboards when opening a legacy document in Illustrator CS4 or later.
Default: true
.
Boolean.
OpenOptions.updateLegacyGradientMesh
Section titled “OpenOptions.updateLegacyGradientMesh”openOptions.updateLegacyGradientMesh
Description
Section titled “Description”If true
, preserves the spot colors in the gradient mesh objects for legacy documents (pre-Illustrator CS4).
Default: true
.
Boolean.
OpenOptions.updateLegacyText
Section titled “OpenOptions.updateLegacyText”openOptions.updateLegacyText
Description
Section titled “Description”Optional. If true
, update all legacy text items (from previous versions of Illustrator).
Default: false
.
Boolean.
Example
Section titled “Example”Automatically updating legacy text on open
Section titled “Automatically updating legacy text on open”// Opens a file with legacy text (AI 10 or older), using// OpenOptions to automatically update the legacy text.
var fileRef = filePath;if (fileRef != null) { var openOptions = new OpenOptions(); openOptions.updateLegacyText = true;
var docRef = open(fileRef, DocumentColorSpace.RGB, openOptions);}