PDFFileOptions
PDFFileOptions
Section titled “PDFFileOptions”app.preferences.PDFFileOptions
Description
Section titled “Description”Options for opening a PDF file, used with the Application.open() method.
All properties are optional.
Properties
Section titled “Properties”PDFFileOptions.pageToOpen
Section titled “PDFFileOptions.pageToOpen”app.preferences.PDFFileOptions.pageToOpen
Description
Section titled “Description”What page should be used when opening a multipage document.
Default: 1
Number (long)
PDFFileOptions.parent
Section titled “PDFFileOptions.parent”app.preferences.PDFFileOptions.parent
Description
Section titled “Description”The object’s container.
Object; read-only.
PDFFileOptions.pDFCropToBox
Section titled “PDFFileOptions.pDFCropToBox”app.preferences.PDFFileOptions.pDFCropToBox
Description
Section titled “Description”Which box should be used when placing a multipage document.
Default: PDFBoxType.PDFMediaBox
PDFFileOptions.typename
Section titled “PDFFileOptions.typename”app.preferences.PDFFileOptions.typename
Description
Section titled “Description”The class name of the object.
String; read-only.
Example
Section titled “Example”Opening a PDF with options
Section titled “Opening a PDF with options”// Opens a PDF file with specified optionsvar pdfOptions = app.preferences.PDFFileOptions;pdfOptions.pDFCropToBox = PDFBoxType.PDFBOUNDINGBOX;pdfOptions.pageToOpen = 2;
// Open a file using these preferencesvar fileRef = filePath;
if (fileRef != null) { var docRef = open(fileRef, DocumentColorSpace.RGB);}