PrintFontOptions
PrintFontOptions
Section titled “PrintFontOptions”new PrintFontOptions()
包含有关用于打印文档的字体下载和替换的信息。
PrintFontOptions.downloadFonts
Section titled “PrintFontOptions.downloadFonts”printFontOptions.downloadFonts
字体下载模式。
默认值: PrintFontDownloadMode.DOWNLOADSUBSET
PrintFontOptions.fontSubstitution
Section titled “PrintFontOptions.fontSubstitution”printFontOptions.fontSubstitution
字体替换策略。
默认值: FontSubstitutionPolicy.SUBSTITUTEOBLIQUE
PrintFontOptions.typename
Section titled “PrintFontOptions.typename”printFontOptions.typename
对象的类名。
字符串; 只读。
使用字体选项进行打印
Section titled “使用字体选项进行打印”// 创建一个新文档,添加文本,然后使用指定的字体选项进行打印。var docRef = documents.add();
var pathRef = docRef.pathItems.rectangle(500, 300, 400, 400);var textRef = docRef.textFrames.areaText(pathRef);textRef.contents = "文本示例";
// 创建 PrintFontOptions 对象并分配给 PrintOptions 对象var fontOpts = new PrintFontOptions();var printOpts = new PrintOptions();printOpts.fontOptions = fontOpts;
// 设置一些字体选项fontOpts.downloadFonts = PrintFontDownloadMode.DOWNLOADNONE;fontOpts.fontSubstitution = FontSubstitutionPolicy.SUBSTITUTEDEVICE;
// 打印activeDocument.print(printOpts);