PDFsharp-net6

PdfCatalog

Namespace: PdfSharp.Pdf.Advanced

Represents the catalog dictionary.

public sealed class PdfCatalog : PdfSharp.Pdf.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 ObjectPdfItemPdfObjectPdfDictionaryPdfCatalog
Implements ICloneable, IEnumerable<KeyValuePair<String, PdfItem>>, IEnumerable

Properties

Version

Get or sets the version of the PDF specification to which the document conforms.

public string Version { get; set; }

Property Value

String

Pages

Gets the pages collection of this document.

public PdfPages Pages { get; }

Property Value

PdfPages

Names

Gets the name dictionary of this document.

public PdfNameDictionary Names { get; }

Property Value

PdfNameDictionary

Destinations

Gets the named destinations defined in the Catalog

public PdfNamedDestinations Destinations { get; }

Property Value

PdfNamedDestinations

AcroForm

Gets the AcroForm dictionary of this document.

public PdfAcroForm AcroForm { get; internal set; }

Property Value

PdfAcroForm

Language

Gets or sets the language identifier specifying the natural language for all text in the document. Sample values are ‘en-US’ for ‘English United States’ or ‘de-DE’ for ‘Deutsch Deutschland’ (i.e. ‘German Germany’).

public string Language { get; set; }

Property Value

String

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.

Constructors

PdfCatalog(PdfDocument)

Initializes a new instance of the PdfCatalog class.

public PdfCatalog(PdfDocument document)

Parameters

document PdfDocument

Methods

PrepareForSave()

Dispatches PrepareForSave to the objects that need it.

internal void PrepareForSave()

WriteObject(PdfWriter)

internal void WriteObject(PdfWriter writer)

Parameters

writer PdfWriter