Skip to content

EPSSaveOptions

epsSaveOptions

Options for saving a document as an Illustrator EPS file, used with the Document.saveAs() method.

All properties are optional.


epsSaveOptions.artboardRange

If saveMultipleArtboards is true, this is considered for multi-asset extraction, which specifies the artboard range. An empty string extracts all the artboards.

Default: empty string

String.


epsSaveOptions.cmykPostScript

If true, use CMYK PostScript.

Boolean.


epsSaveOptions.compatibility

Specifies the version of the EPS file format to save.

Default: Compatibility.ILLUSTRATOR1719.

Compatibility


epsSaveOptions.compatibleGradientPrinting

If true, create a raster item of the gradient or gradient mesh so that PostScript Level 2 printers can print the object.

Default: false.

Boolean.


epsSaveOptions.embedAllFonts

If true, all fonts used by the document should be embedded in the saved file (version 7 or later).

Default: false.

Boolean.


epsSaveOptions.embedLinkedFiles

If true, linked image files are to be included in the saved document.

Boolean.


epsSaveOptions.flattenOuput

How should transparency be flattened for file formats older than Illustrator 9.

OutputFlattening


epsSaveOptions.includeDocumentThumbnails

If true, thumbnail image of the EPS artwork should be included.

Boolean.


epsSaveOptions.overprint

Whether to preserve, discard, or simulate the overprint.

Default: PDFOverprint.PRESERVEPDFOVERPRINT.

PDFOverprint


epsSaveOptions.postScript

PostScript Language Level to use (Level 1 valid for file format version 8 or older).

Default: EPSPostScriptLevelEnum.LEVEL2.

EPSPostScriptLevelEnum


epsSaveOptions.preview

The format for the EPS preview image.

EPSPreview


epsSaveOptions.saveMultipleArtboards

If true, all artboards or range of artboards are saved.

Default: false.

Boolean.


epsSaveOptions.typename

The class name of the referenced object.

String; read-only.


// Exports current document to destFile as an EPS file with specified options,
// destFile contains the full path including the file name
function exportFileAsEPS(destFile) {
var newFile = new File(destFile);
var saveDoc;
if (app.documents.length == 0) {
saveDoc = app.documents.add();
} else {
saveDoc = app.activeDocument;
}
var saveOpts = new ePSSaveOptions();
saveOpts.cmykPostScript = true;
saveOpts.embedAllFonts = true;
saveDoc.saveAs(newFile, saveOpts);
}