PDFsharp-net6

PdfReference

Namespace: PdfSharp.Pdf.Advanced

Represents an indirect reference to a PdfObject.

public sealed class PdfReference : PdfSharp.Pdf.PdfItem, System.ICloneable

Inheritance ObjectPdfItemPdfReference
Implements ICloneable

Properties

ObjectID

Gets or sets the object identifier.

public PdfObjectID ObjectID { get; set; }

Property Value

PdfObjectID

ObjectNumber

Gets the object number of the object identifier.

public int ObjectNumber { get; }

Property Value

Int32

GenerationNumber

Gets the generation number of the object identifier.

public int GenerationNumber { get; }

Property Value

Int32

Position

Gets or sets the file position of the related PdfObject.

public int Position { get; set; }

Property Value

Int32

Value

Gets or sets the referenced PdfObject.

public PdfObject Value { get; set; }

Property Value

PdfObject

Document

Gets or sets the document this object belongs to.

public PdfDocument Document { get; set; }

Property Value

PdfDocument

Constructors

PdfReference(PdfObject)

Initializes a new PdfReference instance for the specified indirect object.

public PdfReference(PdfObject pdfObject)

Parameters

pdfObject PdfObject

PdfReference(PdfObjectID, Int32)

Initializes a new PdfReference instance from the specified object identifier and file position.

public PdfReference(PdfObjectID objectID, int position)

Parameters

objectID PdfObjectID

position Int32

Methods

WriteXRefEntry(PdfWriter)

Writes the object in PDF iref table format.

internal void WriteXRefEntry(PdfWriter writer)

Parameters

writer PdfWriter

WriteObject(PdfWriter)

Writes an indirect reference.

internal void WriteObject(PdfWriter writer)

Parameters

writer PdfWriter

SetObject(PdfObject)

Hack for dead objects.

internal void SetObject(PdfObject value)

Parameters

value PdfObject

ToString()

Gets a string representing the object identifier.

public string ToString()

Returns

String

Dereference(Object&)

Dereferences the specified item. If the item is a PdfReference, the item is set to the referenced value. Otherwise no action is taken.

public static void Dereference(Object& item)

Parameters

item Object&

Dereference(PdfItem&)

Dereferences the specified item. If the item is a PdfReference, the item is set to the referenced value. Otherwise no action is taken.

public static void Dereference(PdfItem& item)

Parameters

item PdfItem&