PDFFileOptions
PDFFileOptions
Section titled “PDFFileOptions”app.preferences.PDFFileOptions
用于打开 PDF 文件的选项,与 Application.open() 方法一起使用。
所有属性都是可选的。
PDFFileOptions.pageToOpen
Section titled “PDFFileOptions.pageToOpen”app.preferences.PDFFileOptions.pageToOpen
打开多页文档时应使用哪一页。
默认值:1
Number (long)
PDFFileOptions.parent
Section titled “PDFFileOptions.parent”app.preferences.PDFFileOptions.parent
对象的容器。
Object; 只读。
PDFFileOptions.pDFCropToBox
Section titled “PDFFileOptions.pDFCropToBox”app.preferences.PDFFileOptions.pDFCropToBox
放置多页文档时应使用哪个框。
默认值:PDFBoxType.PDFMediaBox
PDFFileOptions.typename
Section titled “PDFFileOptions.typename”app.preferences.PDFFileOptions.typename
对象的类名。
String; 只读。
使用选项打开 PDF
Section titled “使用选项打开 PDF”// 使用指定选项打开 PDF 文件var pdfOptions = app.preferences.PDFFileOptions;pdfOptions.pDFCropToBox = PDFBoxType.PDFBOUNDINGBOX;pdfOptions.pageToOpen = 2;
// 使用这些首选项打开文件var fileRef = filePath;
if (fileRef != null) { var docRef = open(fileRef, DocumentColorSpace.RGB);}