PdfReference Class

A reference to an indirect object of a document (ISO 32000-2, 7.3.10), such as 12 0 R.

public sealed class PdfReference : PdfObject, IEquatable<PdfReference>

Remarks

References are created by PdfIndirectObjectCollection: a reference belongs to the indirect objects of one document.

Inheritance
PdfObject PdfReference
Implements

Properties

NameDescription
GenerationGets the generation number.
KindGets the kind of the object.
ObjectNumberGets the object number.

Generation

PdfReference.cs

Gets the generation number.

public int Generation { get; }

Property value

int

Gets the kind of the object.

public override PdfObjectKind Kind { get; }

Property value

PdfObjectKind

ObjectNumber

PdfReference.cs

Gets the object number.

public int ObjectNumber { get; }

Property value

int

Methods

NameDescription
Equals(PdfReference?)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Determines whether the specified object is equal to the current object.
GetHashCode()Serves as the default hash function.
Resolve()Gets the object the reference points to, loading it from the file when needed.

Equals overloads

Equals(PdfReference?)

PdfReference.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(PdfReference? other)
Parameters
other PdfReference?
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

PdfReference.cs

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current object.
Returns

bool true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

PdfReference.cs

Serves as the default hash function.

public override int GetHashCode()

Returns

int A hash code for the current object.

Gets the object the reference points to, loading it from the file when needed.

public PdfObject Resolve()

Returns

PdfObject The object, or PdfNull.Instance when it does not exist (ISO 32000-2, 7.3.10).