# PdfViewerPreferencesOptions

Simple viewer preferences emitted in the generated PDF catalog.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[PdfViewerPreferencesOptions.cs:159](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L159)

**Modifiers**

sealed

Simple viewer preferences emitted in the generated PDF catalog.

## Inheritance

- object
- PdfViewerPreferencesOptions

## Usage

Explore 5 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 3

- Property [PdfCreateOptions.ViewerPreferences](/api/pdf/officeimo-pdf-pdfcreateoptions/#property-viewerpreferences)
- Method [PdfViewerPreferencesOptions.AddPrintPageRange](/api/pdf/officeimo-pdf-pdfviewerpreferencesoptions/#method-addprintpagerange-int32-int32)
- Method [PdfViewerPreferencesOptions.ClearPrintPageRanges](/api/pdf/officeimo-pdf-pdfviewerpreferencesoptions/#method-clearprintpageranges)

### Accepted by parameters 2

- Method [PdfCreateOptions.ConfigureViewerPreferences](/api/pdf/officeimo-pdf-pdfcreateoptions/#method-configureviewerpreferences-action-officeimo-pdf-pdfviewerpreferencesoptions) parameter `configure`
- Method [PdfCreateOptions.SetViewerPreferences](/api/pdf/officeimo-pdf-pdfcreateoptions/#method-setviewerpreferences-officeimo-pdf-pdfviewerpreferencesoptions) parameter `preferences`

Filter members 

Show inherited

## Constructors

`public PdfViewerPreferencesOptions()` [#](#constructor-ctor)

## Methods

AddPrintPageRange 2 overloads

`public PdfViewerPreferencesOptions AddPrintPageRange(int startPageNumber, int endPageNumber)` [#](#method-addprintpagerange-int32-int32)

[PdfViewerPreferencesOptions.cs:159](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L159)

Adds a one-based inclusive page range used to initialize the viewer print dialog.

Parameters

**startPageNumber int required**

**endPageNumber int required**

Returns

`PdfViewerPreferencesOptions`

`public PdfViewerPreferencesOptions AddPrintPageRange(PdfPrintPageRange range)` [#](#method-addprintpagerange-officeimo-pdf-pdfprintpagerange)

[PdfViewerPreferencesOptions.cs:164](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L164)

Adds a one-based inclusive page range used to initialize the viewer print dialog.

Parameters

**range OfficeIMO.Pdf.PdfPrintPageRange required**

Returns

`PdfViewerPreferencesOptions`

`public PdfViewerPreferencesOptions ClearPrintPageRanges()` [#](#method-clearprintpageranges)

[PdfViewerPreferencesOptions.cs:171](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L171)

Clears generated print page ranges while leaving other viewer preferences unchanged.

Returns

`PdfViewerPreferencesOptions`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public bool? DisplayDocTitle { get; set; }` [#](#property-displaydoctitle)

[PdfViewerPreferencesOptions.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L19)

Requests that viewers display the document title from metadata instead of the file name.

`public bool? HideToolbar { get; set; }` [#](#property-hidetoolbar)

[PdfViewerPreferencesOptions.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L21)

Requests that viewers hide the toolbar when the document is opened.

`public bool? HideMenubar { get; set; }` [#](#property-hidemenubar)

[PdfViewerPreferencesOptions.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L23)

Requests that viewers hide the menu bar when the document is opened.

`public bool? HideWindowUI { get; set; }` [#](#property-hidewindowui)

[PdfViewerPreferencesOptions.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L25)

Requests that viewers hide user-interface elements when the document is opened.

`public bool? FitWindow { get; set; }` [#](#property-fitwindow)

[PdfViewerPreferencesOptions.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L27)

Requests that viewers resize the window to fit the first displayed page.

`public bool? CenterWindow { get; set; }` [#](#property-centerwindow)

[PdfViewerPreferencesOptions.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L29)

Requests that viewers center the document window on screen.

`public bool? PickTrayByPdfSize { get; set; }` [#](#property-picktraybypdfsize)

[PdfViewerPreferencesOptions.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L31)

Requests that viewers pick the printer tray based on each page's PDF size.

`public PdfNonFullScreenPageMode? NonFullScreenPageMode { get; set; }` [#](#property-nonfullscreenpagemode)

[PdfViewerPreferencesOptions.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L34)

Requests the page mode used when leaving full-screen display.

`public PdfViewerDirection? Direction { get; set; }` [#](#property-direction)

[PdfViewerPreferencesOptions.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L45)

Requests the viewer page progression direction.

`public PdfPrintScaling? PrintScaling { get; set; }` [#](#property-printscaling)

[PdfViewerPreferencesOptions.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L56)

Requests viewer print scaling behavior.

`public PdfDuplexMode? Duplex { get; set; }` [#](#property-duplex)

[PdfViewerPreferencesOptions.cs:67](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L67)

Requests viewer duplex-printing behavior.

`public PdfPageBoundaryBox? ViewArea { get; set; }` [#](#property-viewarea)

[PdfViewerPreferencesOptions.cs:78](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L78)

Requests the page boundary box used when fitting pages in the viewer.

`public PdfPageBoundaryBox? ViewClip { get; set; }` [#](#property-viewclip)

[PdfViewerPreferencesOptions.cs:89](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L89)

Requests the page boundary box used when clipping pages in the viewer.

`public PdfPageBoundaryBox? PrintArea { get; set; }` [#](#property-printarea)

[PdfViewerPreferencesOptions.cs:100](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L100)

Requests the page boundary box used when printing pages.

`public PdfPageBoundaryBox? PrintClip { get; set; }` [#](#property-printclip)

[PdfViewerPreferencesOptions.cs:111](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L111)

Requests the page boundary box used when clipping printed pages.

`public int? NumCopies { get; set; }` [#](#property-numcopies)

[PdfViewerPreferencesOptions.cs:122](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L122)

Requested number of copies used to initialize the viewer print dialog.

`public IReadOnlyList<PdfPrintPageRange> PrintPageRanges { get; }` [#](#property-printpageranges)

[PdfViewerPreferencesOptions.cs:134](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Model/PdfViewerPreferencesOptions.cs#L134)

One-based inclusive page ranges used to initialize the viewer print dialog.

<!-- PowerForge markdown artifact sha256:8439A3FF006A0176B4A28DF8CEDC962CC9BDF2F57FB532552A4A7B4C97FC4BAE -->
