Class

# PDFViewerOptions

<div class="rst-class">

forsearch

</div>

PDF

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## 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.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                            | Type                                  | Read-Only | Shared |
|-----------------------------------------------------------------|---------------------------------------|-----------|--------|
| `CenterWindow<pdfvieweroptions.centerwindow>`                   | `Boolean</api/data_types/boolean>`    |           |        |
| `DisplayTitle<pdfvieweroptions.displaytitle>`                   | `Boolean</api/data_types/boolean>`    |           |        |
| `FitWindowToPage<pdfvieweroptions.fitwindowtopage>`             | `Boolean</api/data_types/boolean>`    |           |        |
| `Fullscreen<pdfvieweroptions.fullscreen>`                       | `Boolean</api/data_types/boolean>`    |           |        |
| `Layout<pdfvieweroptions.layout>`                               | `Layouts<pdfvieweroptions.layouts>`   |           |        |
| `MenubarVisible<pdfvieweroptions.menubarvisible>`               | `Boolean</api/data_types/boolean>`    |           |        |
| `Sidebar<pdfvieweroptions.sidebar>`                             | `Sidebars<pdfvieweroptions.sidebars>` |           |        |
| `ToolbarVisible<pdfvieweroptions.toolbarvisible>`               | `Boolean</api/data_types/boolean>`    |           |        |
| `WindowControlsVisible<pdfvieweroptions.windowcontrolsvisible>` | `Boolean</api/data_types/boolean>`    |           |        |

## Enumerations

<div id="pdfvieweroptions.layouts">

<div class="rst-class">

forsearch

</div>

</div>

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. |

<div id="pdfvieweroptions.sidebars">

<div class="rst-class">

forsearch

</div>

</div>

PDFViewerOptions.Sidebars

### Sidebars

> The various ways a document can be displayed when opened in a PDF Viewer.
>
> | Name            | Description                                      |
> |-----------------|--------------------------------------------------|
> | None            | No document outline or thumbnail images visible. |
> | TableOfContents | The document outline is visible.                 |
> | Thumbnail       | Thumbnail images are visible.                    |

## Property descriptions

<div id="pdfvieweroptions.centerwindow">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFViewerOptions.CenterWindow

**CenterWindow** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the window is opened centered in the PDF Viewer application.

<div id="pdfvieweroptions.displaytitle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFViewerOptions.DisplayTitle

**DisplayTitle** As `Boolean</api/data_types/boolean>`

> If `True</api/language/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.

<div id="pdfvieweroptions.fitwindowtopage">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFViewerOptions.FitWindowToPage

**FitWindowToPage** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the window opened in the PDF Viewer application will resize to fit the first page of the PDF document.

<div id="pdfvieweroptions.fullscreen">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFViewerOptions.Fullscreen

**Fullscreen** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the window is opened in fullscreen mode in the PDF Viewer application.

<div id="pdfvieweroptions.layout">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFViewerOptions.Layout

**Layout** As `Layouts<pdfvieweroptions.layouts>`

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

<div id="pdfvieweroptions.menubarvisible">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFViewerOptions.MenubarVisible

**MenubarVisible** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the menu bar in the PDF Viewer application will be visible.

<div id="pdfvieweroptions.sidebar">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFViewerOptions.Sidebar

**Sidebar** As `Sidebars<pdfvieweroptions.sidebars>`

> Specifies how the document should be displayed when opened.

<div id="pdfvieweroptions.toolbarvisible">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFViewerOptions.ToolbarVisible

**ToolbarVisible** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the toolbar in the PDF Viewer application will be visible.

<div id="pdfvieweroptions.windowcontrolsvisible">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

PDFViewerOptions.WindowControlsVisible

**WindowControlsVisible** As `Boolean</api/data_types/boolean>`

> If `True</api/language/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:

``` xojo
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

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class; `PDFDocument</api/pdf/pdfdocument>` class.

</div>
