Search results

PdfViewerPreferences API in JavaScript (ES5) Pdf Export API control

Defines the way the document is to be presented on the screen or in print.

// Create a new PDF document
let document : PdfDocument = new PdfDocument();
// Gets viewer preferences
let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
// Destroy the document
document.destroy();

Properties

centerWindow boolean

A flag specifying whether to position the document’s window in the center of the screen.

// Create a new PDF document
let document : PdfDocument = new PdfDocument();
// Gets the viewer preferences of the document
let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
// Gets the center window
let centerWindow : boolean = viewerPreferences.centerWindow;
// Destroy the document
document.destroy();

displayTitle boolean

A flag specifying whether the window’s title bar should display the document title taken from the Title entry of the document information dictionary. If false, the title bar should instead display the name of the PDF file containing the document.

// Create a new PDF document
let document : PdfDocument = new PdfDocument();
// Gets the viewer preferences of the document
let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
// Gets the display title
let displayTitle : boolean = viewerPreferences.displayTitle;
// Destroy the document
document.destroy();

duplex DuplexMode

Gets print duplex mode handling option to use when printing the file from the print dialog.

// Create a new PDF document
let document : PdfDocument = new PdfDocument();
// Gets the viewer preferences of the document
let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
// Gets the duplex
let duplex : DuplexMode = viewerPreferences.duplex;
// Destroy the document
document.destroy();

fitWindow boolean

A flag specifying whether to resize the document’s window to fit the size of the first displayed page.

// Create a new PDF document
let document : PdfDocument = new PdfDocument();
// Gets the viewer preferences of the document
let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
// Gets the fit window
let fitWindow : boolean = viewerPreferences.fitWindow;
// Destroy the document
document.destroy();

hideMenuBar boolean

A flag specifying whether to hide the viewer application’s menu bar when the document is active.

// Create a new PDF document
let document : PdfDocument = new PdfDocument();
// Gets the viewer preferences of the document
let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
// Gets the hide menu bar
let hideMenuBar: boolean = viewerPreferences.hideMenuBar;
// Destroy the document
document.destroy();

hideToolBar boolean

A flag specifying whether to hide the viewer application’s tool bar when the document is active.

// Create a new PDF document
let document : PdfDocument = new PdfDocument();
// Gets the viewer preferences of the document
let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
// Gets the hide tool bar
let hideToolBar: boolean = viewerPreferences.hideToolBar;
// Destroy the document
document.destroy();

hideWindowUI boolean

A flag specifying whether to hide user interface elements in the document’s window (such as scroll bars and navigation controls), leaving only the document’s contents displayed.

// Create a new PDF document
let document : PdfDocument = new PdfDocument();
// Gets the viewer preferences of the document
let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
// Gets the hide window UI
let hideWindowUI: boolean = viewerPreferences.hideWindowUI;
// Destroy the document
document.destroy();

pageLayout PdfPageLayout

A name object specifying the page layout to be used when the document is opened.

// Create a new PDF document
let document : PdfDocument = new PdfDocument();
// Gets the viewer preferences of the document
let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
// Gets the page layout
let pageLayout : PdfPageLayout = viewerPreferences.pageLayout;
// Destroy the document
document.destroy();

pageMode PdfPageMode

A name object specifying how the document should be displayed when opened.

// Create a new PDF document
let document : PdfDocument = new PdfDocument();
// Gets the viewer preferences of the document
let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
// Gets the page mode
let pageMode: PdfPageMode = viewerPreferences.pageMode;
// Destroy the document
document.destroy();

pageScaling PageScalingMode

Gets the page scaling option to be selected when a print dialog is displayed for this document.

// Create a new PDF document
let document : PdfDocument = new PdfDocument();
// Gets the viewer preferences of the document
let viewerPreferences : PdfViewerPreferences = document.viewerPreferences;
// Gets the page scaling
let pageScaling : PageScalingMode = viewerPreferences.pageScaling;
// Destroy the document
document.destroy();