Skip to content

# PDFViewerPreferences

Namespace: O2S.Components.PDF4NET

Defines the way the document is to be presented on the screen or in print.

    public class PDFViewerPreferences

Inheritance Object → PDFViewerPreferences

## Constructors

### PDFViewerPreferences()

Initializes a new PDFViewerPreferences object.

    public PDFViewerPreferences()

## Properties

### CenterWindow

Gets or sets a value indicating whether to position the document's window in the center of the screen.

    public bool CenterWindow { get; set; }

Property Value

Boolean
If true, the document's window is position in the center of the screen.

### CosDictionary

Gets the COS dictionary asssociated with this object.

    public PDFCosDictionary CosDictionary { get; }

Property Value

PDFCosDictionary
The internal COS dictionary.

Remarks

Incorrect manipulation of the information in the COS dictionary can lead to invalid PDF files.

### DisplayDocumentTitle

Gets or sets a value indicating whether the window's title bar should display the document title taken from the PDFDocumentInformation.Title.

    public bool DisplayDocumentTitle { get; set; }

Property Value

Boolean
If true, the window's title bar should display the document title taken from the PDFDocumentInformation.Title. If false, the title bar should instead display the name of the PDF file containing the document.

### DuplexPrinting

Gets of set the recommended duplex printing mode.

    public PDFDuplexPrinting DuplexPrinting { get; set; }

Property Value

PDFDuplexPrinting
The duplex print option to be selected when a print dialog is displayed for this document.

### FitWindow

Gets or sets a value indicating whether to resize the document's window to fit the size of the first displayed page.

    public bool FitWindow { get; set; }

Property Value

Boolean
If true, the document window is resized.

### HideMenubar

Gets or sets a value indicating whether to hide the viewer application's menu bar when the document is active.

    public bool HideMenubar { get; set; }

Property Value

Boolean
If true, the menubar is hidden.

### HideToolbar

Gets or sets a value indicating whether to hide the viewer application's tool bars when the document is active.

    public bool HideToolbar { get; set; }

Property Value

Boolean
If true, the toolbar is hidden.

### HideWindowUI

Gets or sets a value indicating whether to hide user interface elements.

    public bool HideWindowUI { get; set; }

Property Value

Boolean
If true, user interface elements in the document’s window (such as scroll bars and navigation controls) are hidden, leaving only the document's contents displayed.

### NonFullScreenPageMode

Gets or sets the document's page mode.

    public PDFDisplayMode NonFullScreenPageMode { get; set; }

Property Value

PDFDisplayMode
The document's page mode, specifying how to display the document on exiting full-screen mode.

### NumberOfCopies

Gets or sets number of copies that shall be printed.

    public int NumberOfCopies { get; set; }

Property Value

Int32
The number of copies that shall be printed when the print dialog is opened for this document.

### PickTrayByPDFSize

Gets or sets a value indicating whether the PDF page size shall be used to select the input paper tray.

    public bool PickTrayByPDFSize { get; set; }

Property Value

Boolean
If true the PDF page size shall be used to select the input paper tray.

Remarks

This setting influences only the preset values used to populate the print dialogue presented by an interactive PDF processor.

### PrintPageRange

Gets or sets the print page range.

    public Int32[] PrintPageRange { get; set; }

Property Value

Int32[]
The page numbers used to initialize the print dialogue box when the document is printed.

Remarks

The array shall contain an even number of integers to be interpreted in pairs, with each pair specifying the first and last pages in a sub-range of pages to be printed.The first page of the PDF file shall be denoted by 1.

### PrintScaling

Gets or sets how the print scaling.

    public PDFPrintScaling PrintScaling { get; set; }

Property Value

PDFPrintScaling
The page scaling option to be selected when a print dialog is displayed for this document.