Pdf Viewer Preferences |
A pdf document can control the way it will be displayed when opened in a pdf viewer. These properties can be set by Select.Pdf library using ViewerPreferences property of the PdfDocument object.
The following customizations can be done using the PdfViewerPreferences object:
Property | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HideToolbar | A flag specifying whether to hide the pdf viewer application's tool bars when the document is active | ||||||||||||
HideMenuBar | A flag specifying whether to hide the pdf viewer application's menu bar when the document is active. | ||||||||||||
HideWindowUI | 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. | ||||||||||||
FitWindow | A flag specifying whether to resize the document's window to fit the size of the first displayed page. | ||||||||||||
CenterWindow | A flag specifying whether to position the document's window in the center of the screen. | ||||||||||||
DisplayDocTitle | A flag specifying whether the window's title bar should display the document title. | ||||||||||||
PageMode | The document page mode when the pdf document is opened in a pdf viewer. Possible values:
| ||||||||||||
PageLayout | The page layout to be used when the document is opened. Possible values:
| ||||||||||||
NonFullScreenPageMode | The document page mode when the pdf viewer application exits the full screen mode. Possible values:
|
// set the pdf viewer preferences doc.ViewerPreferences.CenterWindow = true; doc.ViewerPreferences.DisplayDocTitle = true; doc.ViewerPreferences.FitWindow = true; doc.ViewerPreferences.HideMenuBar = true; doc.ViewerPreferences.HideToolbar = true; doc.ViewerPreferences.HideWindowUI = false; doc.ViewerPreferences.NonFullScreenPageMode = PdfViewerFullScreenExitMode.UseNone; doc.ViewerPreferences.PageLayout = PdfViewerPageLayout.SinglePage; doc.ViewerPreferences.PageMode = PdfViewerPageMode.UseNone;