Click or drag to resize

PdfViewerPreferences Class

Represents a viewer preferences dictionary (PDF 1.2) controlling the way the document shall be presented on the screen or in print. If no such dictionary is specified, conforming readers should behave in accordance with their own current user preference settings.
Inheritance Hierarchy
SystemObject
  SautinSoft.PdfPdfObject
    SautinSoft.PdfPdfViewerPreferences

Namespace: SautinSoft.Pdf
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2024.11.26
Syntax
public sealed class PdfViewerPreferences : PdfObject

The PdfViewerPreferences type exposes the following members.

Properties
 NameDescription
Public propertyCenterWindow

(Optional) A flag specifying whether to position the document’s window in the center of the screen.

Default value: .

Public propertyDirectionRightToLeft

(Optional; PDF 1.3) A flag specifying whether the predominant reading order for text is right to left. This entry has no direct effect on the document’s contents or page numbering but may be used to determine the relative positioning of pages when displayed side by side or printed n-up.

Default value: .

Public propertyDisplayDocTitle

(Optional) A flag specifying whether the window’s title bar should display the document title taken from the Title entry of the document information dictionary (see 14.3.3, "Document Information Dictionary"). If , the title bar should instead display the name of the PDF file containing the document.

Default value: .

Public propertyFitWindow

(Optional) A flag specifying whether to resize the document’s window to fit the size of the first displayed page.

Default value: .

Public propertyHideMenubar

(Optional) A flag specifying whether to hide the conforming reader’s menu bar when the document is active.

Default value: .

Public propertyHideToolbar

(Optional) A flag specifying whether to hide the conforming reader’s tool bars when the document is active.

Default value: .

Public propertyHideWindowUI

(Optional) A flag specifying whether to hide user interface elements in the document’s window (such as scroll bars and navigation controls), leaving only the document’s contents displayed.

Default value: .

Public propertyNonFullScreenPageMode

(Optional) The document’s page mode, specifying how to display the document on exiting full-screen mode. This entry is meaningful only if the value of the PageMode property is FullScreen; it shall be ignored otherwise.

Default value: UseNone.

Public propertyPrintArea

(Optional; PDF 1.4) The name of the page boundary representing the area of a page that shall be rendered when printing the document. The value is the key designating the relevant page boundary in the page object (see 7.7.3, "Page Tree" and 14.11.2, "Page Boundaries").

Default value: CropBox.

Public propertyPrintClip

(Optional; PDF 1.4) The name of the page boundary to which the contents of a page shall be clipped when printing the document. The value is the key designating the relevant page boundary in the page object (see 7.7.3, "Page Tree" and 14.11.2, "Page Boundaries").

Default value: CropBox.

Public propertyPrintScalingAppDefault

(Optional; PDF 1.6) The page scaling option that shall be selected when a print dialog is displayed for this document. Valid values are , which indicates no page scaling, and , which indicates the conforming reader’s default print scaling.

Default value: .

Public propertyViewArea

(Optional; PDF 1.4) The name of the page boundary representing the area of a page that shall be displayed when viewing the document on the screen. The value is the key designating the relevant page boundary in the page object (see 7.7.3, "Page Tree" and 14.11.2, "Page Boundaries").

Default value: CropBox.

Public propertyViewClip

(Optional; PDF 1.4) The name of the page boundary to which the contents of a page shall be clipped when viewing the document on the screen. The value is the key designating the relevant page boundary in the page object (see 7.7.3, "Page Tree" and 14.11.2, "Page Boundaries").

Default value: CropBox.

Top
Methods
 NameDescription
Public methodClear Removes the ViewerPreferences entry from the parent PdfDocument.
Top
Extension Methods
 NameDescription
Public Extension MethodGetArray Gets the PdfArray that serves as a backing storage of the specified PdfObject or if no PdfArray serves as a backing storage of the specified PdfObject.
(Defined by PdfObjectExtensions)
Public Extension MethodGetDictionary Gets the PdfDictionary that serves as a backing storage of the specified PdfObject.
(Defined by PdfObjectExtensions)
Public Extension MethodGetOrAddDictionary Gets the PdfDictionary that serves as a backing storage of the specified PdfObject.
(Defined by PdfObjectExtensions)
Top
See Also