PDFsharp-net6

PdfViewerPreferences

Namespace: PdfSharp.Pdf

Represents the PDF document viewer preferences dictionary.

public sealed class PdfViewerPreferences : PdfDictionary, System.ICloneable, System.Collections.Generic.IEnumerable`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[PdfSharp.Pdf.PdfItem, PdfSharp, Version=0.1.3.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.IEnumerable

Inheritance ObjectPdfItemPdfObjectPdfDictionaryPdfViewerPreferences
Implements ICloneable, IEnumerable<KeyValuePair<String, PdfItem>>, IEnumerable

Properties

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

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

HideWindowUI

Gets or sets a value indicating 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.

public bool HideWindowUI { get; set; }

Property Value

Boolean

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

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

DisplayDocTitle

Gets or sets a value indicating whether the window’s title bar should display the document title taken from the Title entry of the document information dictionary. If false, the title bar should instead display the name of the PDF file containing the document.

public bool DisplayDocTitle { get; set; }

Property Value

Boolean

Direction

The predominant reading order for text: LeftToRight or RightToLeft (including vertical writing systems, such as Chinese, Japanese, and Korean). This entry has no direct effect on the document’s contents or page numbering but can be used to determine the relative positioning of pages when displayed side by side or printed n-up. Default value: LeftToRight.

public Nullable<PdfReadingDirection> Direction { get; set; }

Property Value

Nullable<PdfReadingDirection>

Elements

Gets the dictionary containing the elements of this dictionary.

public DictionaryElements Elements { get; }

Property Value

DictionaryElements

Stream

Gets or sets the PDF stream belonging to this dictionary. Returns null if the dictionary has no stream. To create the stream, call the CreateStream function.

public PdfStream Stream { get; set; }

Property Value

PdfStream

Owner

Gets the PdfDocument this object belongs to.

public PdfDocument Owner { get; }

Property Value

PdfDocument

IsIndirect

Indicates whether the object is an indirect object.

public bool IsIndirect { get; }

Property Value

Boolean

Internals

Gets the PdfInternals object of this document, that grants access to some internal structures which are not part of the public interface of PdfDocument.

public PdfObjectInternals Internals { get; }

Property Value

PdfObjectInternals

Reference

Gets the indirect reference of this object. If the value is null, this object is a direct object.

public PdfReference Reference { get; internal set; }

Property Value

PdfReference

ReferenceNotNull

Gets the indirect reference of this object. Throws if it is null.

public PdfReference ReferenceNotNull { get; }

Property Value

PdfReference

Exceptions

InvalidOperationException
The indirect reference must be not null here.