Skip to content

IllustratorSaveOptions

illustratorSaveOptions

Options for saving a document as an Illustrator file, used with the Document.saveAs() method. All properties are optional.


illustratorSaveOptions.artboardRange

If saveMultipleArtboards is true (which is valid only for Illustrator 13 or earlier), the document is considered for multi-asset extraction, which specifies an artboard range. An empty string extracts all artboards.

Default: empty String.

String.


illustratorSaveOptions.compatibility

Specifies the version of Illustrator file format to create.

Default: Compatibility.ILLUSTRATOR19.

Compatibility


illustratorSaveOptions.compressed

If true, the saved file is compressed.

Default: true.

Boolean.


illustratorSaveOptions.embedICCProfile

If true, the document’s ICC profile is embedded in the saved file.

Default: false.

Boolean.


illustratorSaveOptions.embedLinkedFiles

If true, the linked image files is embedded in the saved file.

Default: false.

Boolean.


illustratorSaveOptions.flattenOutput

How transparency should be flattened for older file format versions.

Default: OutputFlattening.PRESERVEAPPEARANCE.

OutputFlattening


IllustratorSaveOptions.fontSubsetThreshold

Section titled “IllustratorSaveOptions.fontSubsetThreshold”

illustratorSaveOptions.fontSubsetThreshold

Include a subset of fonts when less than this percentage of characters is used in the document.

Range: 0.0 to 100.0.

Default: 100.0.

Number (double).


illustratorSaveOptions.pdfCompatible

If true, the file is saved as a PDF compatible file.

Default: true.

Boolean.


IllustratorSaveOptions.saveMultipleArtboards

Section titled “IllustratorSaveOptions.saveMultipleArtboards”

illustratorSaveOptions.saveMultipleArtboards

If true, all artboards or range of the artboards are saved. Valid for Illustrator 13 or earlier.

Boolean.


illustratorSaveOptions.typename

The class name of the referenced object.

String; read-only.


// Saves the current document to dest as an AI file with specified options,
// dest specifies the full path and file name of the new file
function exportFileToAI(dest) {
if (app.documents.length > 0) {
var ai8Doc = new File(dest);
var saveOptions = new IllustratorSaveOptions();
saveOptions.compatibility = Compatibility.ILLUSTRATOR8;
saveOptions.flattenOutput = OutputFlattening.PRESERVEAPPEARANCE;
app.activeDocument.saveAs(ai8Doc, saveOptions);
}
}