Table of Contents

Class PdfObject

Namespace
nebulae.dotPDFium
Assembly
dotPDFium.dll

This class is the base class for all PDFium objects. It implements IDisposable to ensure proper resource management.

public abstract class PdfObject : IDisposable
Inheritance
PdfObject
Implements
Derived
Inherited Members

Constructors

PdfObject(nint, PdfObjectType)

Base class constructor. This constructor is protected and should not be used directly.

protected PdfObject(nint handle, PdfObjectType type)

Parameters

handle nint
type PdfObjectType

Fields

_disposed

protected bool _disposed

Field Value

bool

_handle

protected nint _handle

Field Value

nint

_type

protected PdfObjectType _type

Field Value

PdfObjectType

Properties

Handle

public nint Handle { get; }

Property Value

nint

IsDisposed

public bool IsDisposed { get; }

Property Value

bool

Type

public PdfObjectType Type { get; }

Property Value

PdfObjectType

Methods

Dispose()

Releases the resources used by this instance of the PdfObject class.

public virtual void Dispose()

Dispose(bool)

Releases the resources used by the current instance of the class.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

Are we disposing managed objects?

Remarks

This method should be called when the instance is no longer needed to free unmanaged resources. It ensures that any associated native resources are properly released based on the type of the object.

Exceptions

InvalidOperationException

Thrown if the object type is not supported for disposal.

~PdfObject()

Base class destructor. This destructor is here for the IDisposable pattern.

protected ~PdfObject()

GetPDFiumError()

Returns the last error message from PDFium.

public static string GetPDFiumError()

Returns

string