IllustratorSaveOptions
IllustratorSaveOptions
Section titled “IllustratorSaveOptions”illustratorSaveOptions
用于将文档保存为 Illustrator 文件的选项,与 Document.saveAs() 方法一起使用。所有属性都是可选的。
IllustratorSaveOptions.artboardRange
Section titled “IllustratorSaveOptions.artboardRange”illustratorSaveOptions.artboardRange
如果 saveMultipleArtboards
为 true
(仅适用于 Illustrator 13 或更早版本),文档将被视为多资源提取,指定画板范围。空字符串表示提取所有画板。
默认值:空字符串。
字符串。
IllustratorSaveOptions.compatibility
Section titled “IllustratorSaveOptions.compatibility”illustratorSaveOptions.compatibility
指定要创建的 Illustrator 文件格式的版本。
默认值:Compatibility.ILLUSTRATOR19
。
IllustratorSaveOptions.compressed
Section titled “IllustratorSaveOptions.compressed”illustratorSaveOptions.compressed
如果为 true
,保存的文件将被压缩。
默认值:true
。
布尔值。
IllustratorSaveOptions.embedICCProfile
Section titled “IllustratorSaveOptions.embedICCProfile”illustratorSaveOptions.embedICCProfile
如果为 true
,文档的 ICC 配置文件将嵌入到保存的文件中。
默认值:false
。
布尔值。
IllustratorSaveOptions.embedLinkedFiles
Section titled “IllustratorSaveOptions.embedLinkedFiles”illustratorSaveOptions.embedLinkedFiles
如果为 true
,链接的图像文件将嵌入到保存的文件中。
默认值:false
。
布尔值。
IllustratorSaveOptions.flattenOutput
Section titled “IllustratorSaveOptions.flattenOutput”illustratorSaveOptions.flattenOutput
对于较旧的文件格式版本,应如何展平透明度。
默认值:OutputFlattening.PRESERVEAPPEARANCE
。
IllustratorSaveOptions.fontSubsetThreshold
Section titled “IllustratorSaveOptions.fontSubsetThreshold”illustratorSaveOptions.fontSubsetThreshold
当文档中使用的字符少于该百分比时,包含字体的子集。
范围:0.0 到 100.0。
默认值:100.0。
数字(双精度)。
IllustratorSaveOptions.pdfCompatible
Section titled “IllustratorSaveOptions.pdfCompatible”illustratorSaveOptions.pdfCompatible
如果为 true
,文件将保存为 PDF 兼容文件。
默认值:true
。
布尔值。
IllustratorSaveOptions.saveMultipleArtboards
Section titled “IllustratorSaveOptions.saveMultipleArtboards”illustratorSaveOptions.saveMultipleArtboards
如果为 true
,则保存所有画板或画板范围。仅适用于 Illustrator 13 或更早版本。
布尔值。
IllustratorSaveOptions.typename
Section titled “IllustratorSaveOptions.typename”illustratorSaveOptions.typename
引用对象的类名。
字符串;只读。
使用选项保存
Section titled “使用选项保存”// 将当前文档保存为 AI 文件,并指定选项,// dest 指定新文件的完整路径和文件名
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); }}