Namespace: PdfSharp.Pdf
Base class of all composite PDF objects.
public abstract class PdfObject : PdfItem, System.ICloneable
Inheritance Object → PdfItem → PdfObject
Implements ICloneable
Gets the PdfDocument this object belongs to.
public PdfDocument Owner { get; }
Indicates whether the object is an indirect object.
public bool IsIndirect { get; }
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; }
Gets the indirect reference of this object. If the value is null, this object is a direct object.
public PdfReference Reference { get; internal set; }
Gets the indirect reference of this object. Throws if it is null.
public PdfReference ReferenceNotNull { get; }
InvalidOperationException
The indirect reference must be not null here.
Creates a copy of this object. The clone does not belong to a document, i.e. its owner and its iref are null.
public PdfObject Clone()
Implements the copy mechanism. Must be overridden in derived classes.
protected object Copy()
Sets the object and generation number. Setting the object identifier makes this object an indirect object, i.e. the object gets a PdfReference entry in the PdfReferenceTable.
internal void SetObjectID(int objectNumber, int generationNumber)
objectNumber
Int32
generationNumber
Int32
When overridden in a derived class, prepares the object to get saved.
internal void PrepareForSave()
Saves the stream position. 2nd Edition.
internal void WriteObject(PdfWriter writer)
writer
PdfWriter
internal static PdfObject DeepCopyClosure(PdfDocument owner, PdfObject externalObject)
owner
PdfDocument
The document that owns the cloned objects.
externalObject
PdfObject
The root object to be cloned.
PdfObject
The clone of the root object
internal static PdfObject ImportClosure(PdfImportedObjectTable importedObjectTable, PdfDocument owner, PdfObject externalObject)
importedObjectTable
PdfImportedObjectTable
The imported object table of the owner for the external document.
owner
PdfDocument
The document that owns the cloned objects.
externalObject
PdfObject
The root object to be cloned.
PdfObject
The clone of the root object