GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfViewerPreferences Class

    Namespace:
    GemBox.Pdf
    Assembly:
    GemBox.Pdf.dll

    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.

    • C#
    • VB.NET
    public sealed class PdfViewerPreferences : PdfObject
    Public NotInheritable Class PdfViewerPreferences
        Inherits PdfObject
    Inheritance:
    System.Object
    PdfObject
    PdfViewerPreferences

    Properties

    CenterWindow

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

    Default value: false.

    • C#
    • VB.NET
    public bool CenterWindow { get; set; }
    Public Property CenterWindow As Boolean
    Property Value
    System.Boolean

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

    See Also
    PDF Specification ISO 32000-1:2008, section '12.2 Viewer Preferences'

    DirectionRightToLeft

    (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: false.

    • C#
    • VB.NET
    public bool DirectionRightToLeft { get; set; }
    Public Property DirectionRightToLeft As Boolean
    Property Value
    System.Boolean

    A flag specifying whether the predominant reading order for text is right to left.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.2 Viewer Preferences'

    DisplayDocTitle

    (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 false, the title bar should instead display the name of the PDF file containing the document.

    Default value: false.

    • C#
    • VB.NET
    public bool DisplayDocTitle { get; set; }
    Public Property DisplayDocTitle As Boolean
    Property Value
    System.Boolean

    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 Also
    PDF Specification ISO 32000-1:2008, section '12.2 Viewer Preferences'

    FitWindow

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

    Default value: false.

    • C#
    • VB.NET
    public bool FitWindow { get; set; }
    Public Property FitWindow As Boolean
    Property Value
    System.Boolean

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

    See Also
    PDF Specification ISO 32000-1:2008, section '12.2 Viewer Preferences'

    HideMenubar

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

    Default value: false.

    • C#
    • VB.NET
    public bool HideMenubar { get; set; }
    Public Property HideMenubar As Boolean
    Property Value
    System.Boolean

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

    See Also
    PDF Specification ISO 32000-1:2008, section '12.2 Viewer Preferences'

    HideToolbar

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

    Default value: false.

    • C#
    • VB.NET
    public bool HideToolbar { get; set; }
    Public Property HideToolbar As Boolean
    Property Value
    System.Boolean

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

    See Also
    PDF Specification ISO 32000-1:2008, section '12.2 Viewer Preferences'

    HideWindowUI

    (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: false.

    • C#
    • VB.NET
    public bool HideWindowUI { get; set; }
    Public Property HideWindowUI As Boolean
    Property Value
    System.Boolean

    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.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.2 Viewer Preferences'

    NonFullScreenPageMode

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

    • C#
    • VB.NET
    public PdfPageMode NonFullScreenPageMode { get; set; }
    Public Property NonFullScreenPageMode As PdfPageMode
    Property Value
    PdfPageMode

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

    See Also
    PDF Specification ISO 32000-1:2008, section '12.2 Viewer Preferences'

    PrintArea

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

    • C#
    • VB.NET
    public PdfPageBoundaryType PrintArea { get; set; }
    Public Property PrintArea As PdfPageBoundaryType
    Property Value
    PdfPageBoundaryType

    The name of the page boundary representing the area of a page that shall be rendered when printing the document.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.2 Viewer Preferences'

    PrintClip

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

    • C#
    • VB.NET
    public PdfPageBoundaryType PrintClip { get; set; }
    Public Property PrintClip As PdfPageBoundaryType
    Property Value
    PdfPageBoundaryType

    The name of the page boundary to which the contents of a page shall be clipped when printing the document.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.2 Viewer Preferences'

    PrintScalingAppDefault

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

    Default value: true.

    • C#
    • VB.NET
    public bool PrintScalingAppDefault { get; set; }
    Public Property PrintScalingAppDefault As Boolean
    Property Value
    System.Boolean

    false indicates no page scaling while true indicates the conforming reader’s default print scaling.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.2 Viewer Preferences'

    ViewArea

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

    • C#
    • VB.NET
    public PdfPageBoundaryType ViewArea { get; set; }
    Public Property ViewArea As PdfPageBoundaryType
    Property Value
    PdfPageBoundaryType

    The name of the page boundary representing the area of a page that shall be displayed when viewing the document on the screen.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.2 Viewer Preferences'

    ViewClip

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

    • C#
    • VB.NET
    public PdfPageBoundaryType ViewClip { get; set; }
    Public Property ViewClip As PdfPageBoundaryType
    Property Value
    PdfPageBoundaryType

    The name of the page boundary to which the contents of a page shall be clipped when viewing the document on the screen.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.2 Viewer Preferences'

    Methods

    Clear()

    Removes the ViewerPreferences entry from the parent PdfDocument.

    • C#
    • VB.NET
    public void Clear()
    Public Sub Clear

    Inherited Properties

    Metadata

    (Optional; PDF 1.4) A metadata stream containing metadata for the component.

    (Inherited from PdfObject)

    Extension Methods

    PdfObjectExtensions.GetDictionary(PdfObject)
    PdfObjectExtensions.GetOrAddDictionary(PdfObject)
    PdfObjectExtensions.GetArray(PdfObject)

    Examples

    Viewer Preferences example

    See Also

    PDF Specification ISO 32000-1:2008, section '12.2 Viewer Preferences'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.