微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Photoshop 脚本:无法设置“另存为 PDF”选项

如何解决Photoshop 脚本:无法设置“另存为 PDF”选项

我正在尝试使用扩展脚本将 Adob​​e Photoshop 文件保存为 PDF。我想将 PDF 兼容性设置为 Acrobat 6 并将编码设置为 zip。当我指定这些设置时,我收到了如下脚本注释中所示的错误。我做错了什么?

#target photoshop

if (documents.length > 0) {
    var saveOptions = new PDFSaveOptions();
  
    // This throws "PDFCompatibilityType is undefined" 
    saveOptions.PDFCompatibility = PDFCompatibilityType.PDF15; // Acrobat 6 or higher
  
    // These throw "Undefined is not an object" 
    saveOptions.PDFCompatibility = PDFSaveOptions.PDFCompatibilityType.PDF15; // Acrobat 6 or higher
    saveOptions.PDFCompatibility = saveOptions.PDFCompatibilityType.PDF15; // Acrobat 6 or higher
  
    // This throws "Enumerated Value Expected" 
    saveOptions.PDFCompatibility = 3; // Acrobat 6 or higher
  
    // Same problems with these settings
    // saveOptions.PDFStandard = PDFStandardType.NONE;
    // saveOptions.downSample = PDFResampleType.PDFBICUBIC;
    // saveOptions.encoding = PDFEncodingType.PDFZIP;

    // Save as PDF
    var f = new File( "~/Desktop/SAVE_TEST.pdf" );
    app.activeDocument.saveAs( f,saveOptions,true,Extension.LOWERCASE );
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。