IllustratorSaveOptions
IllustratorSaveOptions
Section titled “IllustratorSaveOptions”illustratorSaveOptions
Description
Section titled “Description”Options for saving a document as an Illustrator file, used with the Document.saveAs() method. All properties are optional.
Properties
Section titled “Properties”IllustratorSaveOptions.artboardRange
Section titled “IllustratorSaveOptions.artboardRange”illustratorSaveOptions.artboardRange
Description
Section titled “Description”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
Section titled “IllustratorSaveOptions.compatibility”illustratorSaveOptions.compatibility
Description
Section titled “Description”Specifies the version of Illustrator file format to create.
Default: Compatibility.ILLUSTRATOR19
.
IllustratorSaveOptions.compressed
Section titled “IllustratorSaveOptions.compressed”illustratorSaveOptions.compressed
Description
Section titled “Description”If true
, the saved file is compressed.
Default: true
.
Boolean.
IllustratorSaveOptions.embedICCProfile
Section titled “IllustratorSaveOptions.embedICCProfile”illustratorSaveOptions.embedICCProfile
Description
Section titled “Description”If true
, the document’s ICC profile is embedded in the saved file.
Default: false
.
Boolean.
IllustratorSaveOptions.embedLinkedFiles
Section titled “IllustratorSaveOptions.embedLinkedFiles”illustratorSaveOptions.embedLinkedFiles
Description
Section titled “Description”If true
, the linked image files is embedded in the saved file.
Default: false
.
Boolean.
IllustratorSaveOptions.flattenOutput
Section titled “IllustratorSaveOptions.flattenOutput”illustratorSaveOptions.flattenOutput
Description
Section titled “Description”How transparency should be flattened for older file format versions.
Default: OutputFlattening.PRESERVEAPPEARANCE
.
IllustratorSaveOptions.fontSubsetThreshold
Section titled “IllustratorSaveOptions.fontSubsetThreshold”illustratorSaveOptions.fontSubsetThreshold
Description
Section titled “Description”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
Section titled “IllustratorSaveOptions.pdfCompatible”illustratorSaveOptions.pdfCompatible
Description
Section titled “Description”If true
, the file is saved as a PDF compatible file.
Default: true
.
Boolean.
IllustratorSaveOptions.saveMultipleArtboards
Section titled “IllustratorSaveOptions.saveMultipleArtboards”illustratorSaveOptions.saveMultipleArtboards
Description
Section titled “Description”If true
, all artboards or range of the artboards are saved. Valid for Illustrator 13 or earlier.
Boolean.
IllustratorSaveOptions.typename
Section titled “IllustratorSaveOptions.typename”illustratorSaveOptions.typename
Description
Section titled “Description”The class name of the referenced object.
String; read-only.
Example
Section titled “Example”Saving with options
Section titled “Saving with options”// 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); }}