Table of Contents

Class PdfObject

Namespace
PdfSharp.Pdf
Assembly
PdfSharp.dll

Base class of all composite PDF objects.

public abstract class PdfObject : PdfItem, ICloneable
Inheritance
PdfObject
Implements
Derived
Inherited Members

Constructors

PdfObject()

Initializes a new instance of the PdfObject class.

protected PdfObject()

PdfObject(PdfDocument)

Initializes a new instance of the PdfObject class.

protected PdfObject(PdfDocument document)

Parameters

document PdfDocument

PdfObject(PdfObject)

Initializes a new instance from an existing object. Used for object type transformation.

protected PdfObject(PdfObject obj)

Parameters

obj PdfObject

Properties

Comment

Gets or sets the comment for debugging purposes.

public string Comment { get; set; }

Property Value

string

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

IsIndirect

Indicates whether the object is an indirect object.

public bool IsIndirect { get; }

Property Value

bool

Owner

Gets the PdfDocument this object belongs to.

public virtual PdfDocument Owner { get; }

Property Value

PdfDocument

Reference

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

public PdfReference? Reference { get; }

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.

Methods

Clone()

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()

Returns

PdfObject

Copy()

Implements the copy mechanism. Must be overridden in derived classes.

protected override object Copy()

Returns

object