Click or drag to resize

PdfiumFPDF_GetViewerPreferences Method

Get viewer preferences for a PDF document.

Namespace: Patagames.Pdf
Assembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.100.2704
Syntax
public static bool FPDF_GetViewerPreferences(
	IntPtr document,
	out bool hideToolbar,
	out bool hideMenubar,
	out bool hideWindowUI,
	out bool fitWindow,
	out bool centerWindow,
	out bool displayDocTitle,
	out bool pickTrayByPDFSize,
	out int numCopies,
	out string nonFullScreenPageMode,
	out string direction,
	out string viewArea,
	out string viewClip,
	out string printArea,
	out string printClip,
	out string printScaling,
	out string duplex,
	out int[] printPageRange
)

Parameters

document  IntPtr
Handle to document. Returned by FPDF_LoadDocument(String, String) or FPDF_CreateNewDocument.
hideToolbar  Boolean
A flag specifying whether to hide the viewer application’s tool bars when the document is active. Default value: false.
hideMenubar  Boolean
A flag specifying whether to hide the viewer application’s menu bar when the document is active. Default value: false.
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. Default value: false.
fitWindow  Boolean
A flag specifying whether to resize the document’s window to fit the size of the first displayed page.Default value: false.
centerWindow  Boolean
A flag specifying whether to position the document’s window in the center of the screen.Default value: false.
displayDocTitle  Boolean
A flag specifying whether the window’s title bar should display the document title. If false, the title bar should instead display the name of the PDF file containing the document. Default value: false.
pickTrayByPDFSize  Boolean
A flag specifying whether the PDF page size is used to select the input paper tray. This setting influences only the preset values used to populate the print dialog presented by a PDF viewer application. If pickTrayByPDFSize is true, the check box in the print dialog associated with input paper tray is checked. This setting has no effect on Mac OS systems, which do not provide the ability to pick the input tray by size. Default value: as defined by the PDF viewer application
numCopies  Int32
The number of copies to be printed when the print dialog is opened for this file. Supported values are the integers 2 through 5. Values outside this range are ignored. Default value: as defined by PDF viewer application, but typically 1.
nonFullScreenPageMode  String
The document’s page mode, specifying how to display the document on exiting full-screen mode:

The nonFullScreenPageMode is meaningful only in the FullScreen mode; it is ignored otherwise. Default value: UseNone.
direction  String
The predominant reading order for text:

The direction has no direct effect on the document’s contents or page numbering but can be used to determine the relative positioning of pages when displayed side by side or printed n-up. Default value: L2R.
viewArea  String
The name of the page boundary representing the area of a page to be displayed when viewing the document on the screen. Default value: CropBox.
Note  Note
This parameter is intended primarily for use by prepress applications that interpret or manipulate the page boundaries. Most PDF consumer applications disregard it.
viewClip  String
The name of the page boundary to which the contents of a page are to be clipped when viewing the document on the screen. Default value: CropBox.
Note  Note
This parameter is intended primarily for use by prepress applications that interpret or manipulate the page boundaries. Most PDF consumer applications disregard it.
printArea  String
The name of the page boundary representing the area of a page to be rendered when printing the document. Default value: CropBox.
Note  Note
This parameter is intended primarily for use by prepress applications that interpret or manipulate the page boundaries. Most PDF consumer applications disregard it.
printClip  String
The name of the page boundary to which the contents of a page are to be clipped when printing the document. Default value: CropBox.
Note  Note
This parameter is intended primarily for use by prepress applications that interpret or manipulate the page boundaries. Most PDF consumer applications disregard it.
printScaling  String
The page scaling option to be selected when a print dialog is displayed for this document. Valid values are None, which indicates that the print dialog should reflect no page scaling, and AppDefault, which indicates that applications should use the current print scaling. If this entry has an unrecognized value, applications should use the current print scaling. Default value: AppDefault.
Note  Note
If the print dialog is suppressed and its parameters are provided directly by the application, the value of this parameter should still be used.
duplex  String
The paper handling option to use when printing the file from the print dialog.The following values are valid:

Default value: none.
printPageRange  Int32
The page numbers used to initialize the print dialog box when the file is printed. The first page of the PDF file is denoted by 1. Each pair consists of the first and last pages in the sub-range. An odd number of integers causes this parameter to be ignored. Negative numbers cause the entire array to be ignored. Default value: as defined by PDF viewer application.

Return Value

Boolean
False if there is no Viewer Preferences in the documen's Catalog.
See Also