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