Class

PDFViewerOptions


Description

Used to pass the initial options for any external viewer that will be called to display a PDF file. The viewer application the OS uses to display PDF files may or may not honor these settings.

Enumerations

PDFViewerOptions.Layouts

Layouts

Specifies the layout to be used when document is opened.

Name

Description

SinglePage

Displays one page at a time.

OneColumn

Displays the pages in a single column.

TwoColumnLeft

Displays the pages in two columns with odd-numbered pages on the left.

TwoColumnRight

Displays the pages in two columns with odd-numbered pages on the right.

PDFViewerOptions.Sidebars

Property descriptions


PDFViewerOptions.CenterWindow

CenterWindow As Boolean

If true, the window is opened centered in the PDF Viewer application.


PDFViewerOptions.DisplayTitle

DisplayTitle As Boolean

If true, the PDF Viewer's window title will be set to the PDF document's Title property. Otherwise, it will be the name of the PDF file itself.


PDFViewerOptions.FitWindowToPage

FitWindowToPage As Boolean

If true, the window opened in the PDF Viewer application will resize to fit the first page of the PDF document.


PDFViewerOptions.Fullscreen

Fullscreen As Boolean

If true, the window is opened in fullscreen mode in the PDF Viewer application.


PDFViewerOptions.Layout

Layout As Layouts

The layout of the pages to be used when the document is displayed.


PDFViewerOptions.MenubarVisible

MenubarVisible As Boolean

If true, the menu bar in the PDF Viewer application will be visible.


PDFViewerOptions.Sidebar

Sidebar As Sidebars

Specifies how the document should be displayed when opened.


PDFViewerOptions.ToolbarVisible

ToolbarVisible As Boolean

If true, the toolbar in the PDF Viewer application will be visible.


PDFViewerOptions.WindowControlsVisible

WindowControlsVisible As Boolean

If true, the window controls such for navigation and scrolling in the PDF Viewer application will be visible.

Notes

This example creates a PDF document then creates settings for the external PDF viewer with the all UI elements hidden then sets the layout to TwoColumnLeft and the mode to fullscreen:

Var doc as New PDFDocument

Var options As New PDFViewerOptions
options.ToolbarVisible = False
options.MenuBarVisible = False
options.WindowControlsVisible = False
options.FitWindowToPage = True
options.FullScreen = True
options.Layout = PDFViewerOptions.Layouts.TwoColumnLeft

doc.ViewerOptions = options

Compatibility

Desktop, console, web and iOS project types on all supported operating systems.

See also

Object parent class; PDFDocument class.