PDFViewerOptions

From Xojo Documentation

Class (inherits from Object)


New in 2021r2

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.

Properties
CenterWindow FullScreen Sidebar
DisplayTitle Layout ToolbarVisible
FitWindowToPage MenuBarVisible WindowControlsVisible
Enumerations
Layouts Sidebars

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

All project types on all supported operating systems. Desktop projects on Linux, macOS and Windows.

See Also

PDFDocument class.