Skip to content

PDFFileOptions

app.preferences.PDFFileOptions

Options for opening a PDF file, used with the Application.open() method.

All properties are optional.


app.preferences.PDFFileOptions.pageToOpen

What page should be used when opening a multipage document.

Default: 1

Number (long)


app.preferences.PDFFileOptions.parent

The object’s container.

Object; read-only.


app.preferences.PDFFileOptions.pDFCropToBox

Which box should be used when placing a multipage document.

Default: PDFBoxType.PDFMediaBox

PDFBoxType


app.preferences.PDFFileOptions.typename

The class name of the object.

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);
}