Skip to content

OpenOptions

openOptions

Options for opening a document, used with the Application.open() method.


openOptions.convertCropAreaToArboard

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

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

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

Optional. Open the file as an Illustrator library of this type.

Default: LibraryType.IllustratorArtwork.

LibraryType


openOptions.preserveLegacyArtboard

Optional. Preserve legacy artboards when opening a legacy document in Illustrator CS4 or later.

Default: true.

Boolean.


openOptions.updateLegacyGradientMesh

If true, preserves the spot colors in the gradient mesh objects for legacy documents (pre-Illustrator CS4).

Default: true.

Boolean.


openOptions.updateLegacyText

Optional. If true, update all legacy text items (from previous versions of Illustrator).

Default: false.

Boolean.


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);
}