PdfObjectExtensions Class
Provides access to low level PdfDictionary and PdfArray objects that are used as a backing storage of PdfObject and PdfCollection derived types.
- Inheritance:
- System.ObjectPdfObjectExtensions
Methods
GetArray(PdfCollection)
Gets the PdfArray that serves as a backing storage of the specified PdfCollection.
public static PdfArray GetArray(this PdfCollection collection)
<ExtensionAttribute>
Public Shared Function GetArray(collection As PdfCollection) As PdfArray
Parameters
collection
- PdfCollection
The PdfCollection for which the backing PdfArray should be retrieved.
Returns
A PdfArray that serves as a backing storage of the specified PdfCollection.
Remarks
warning
Changes made to the returned PdfArray are not verified to be in accordance with the PDF Specification ISO 32000-1:2008 so make them at your own risk.
Exceptions
- System.ArgumentNullException
collection
is null.
GetArray(PdfObject)
Gets the PdfArray that serves as a backing storage of the specified PdfObject or null if no PdfArray serves as a backing storage of the specified PdfObject.
public static PdfArray GetArray(this PdfObject obj)
<ExtensionAttribute>
Public Shared Function GetArray(obj As PdfObject) As PdfArray
Parameters
Returns
Remarks
warning
Changes made to the returned PdfArray are not verified to be in accordance with the PDF Specification ISO 32000-1:2008 so make them at your own risk.
Exceptions
- System.ArgumentNullException
obj
is null.
GetDictionary(PdfObject)
Gets the PdfDictionary that serves as a backing storage of the specified PdfObject.
public static PdfDictionary GetDictionary(this PdfObject obj)
<ExtensionAttribute>
Public Shared Function GetDictionary(obj As PdfObject) As PdfDictionary
Parameters
obj
- PdfObject
The PdfObject for which the backing PdfDictionary should be retrieved.
Returns
A PdfDictionary that serves as a backing storage of the specified PdfObject.
Remarks
warning
Changes made to the returned PdfDictionary are not verified to be in accordance with the PDF Specification ISO 32000-1:2008 so make them at your own risk.
Exceptions
- System.ArgumentNullException
obj
is null.
GetOrAddArray(PdfCollection)
Gets the PdfArray that serves as a backing storage of the specified PdfCollection.
public static PdfArray GetOrAddArray(this PdfCollection collection)
<ExtensionAttribute>
Public Shared Function GetOrAddArray(collection As PdfCollection) As PdfArray
Parameters
collection
- PdfCollection
The PdfCollection for which the backing PdfArray should be retrieved.
Returns
A PdfArray that serves as a backing storage of the specified PdfCollection.
Remarks
If the backing PdfArray is null (lazily created when modifying the PdfCollection), then the backing PdfArray is created, added to the underlying model and returned.
warning
Changes made to the returned PdfArray are not verified to be in accordance with the PDF Specification ISO 32000-1:2008 so make them at your own risk.
Exceptions
- System.ArgumentNullException
collection
is null.
GetOrAddDictionary(PdfObject)
Gets the PdfDictionary that serves as a backing storage of the specified PdfObject.
public static PdfDictionary GetOrAddDictionary(this PdfObject obj)
<ExtensionAttribute>
Public Shared Function GetOrAddDictionary(obj As PdfObject) As PdfDictionary
Parameters
obj
- PdfObject
The PdfObject for which the backing PdfDictionary should be retrieved.
Returns
A PdfDictionary that serves as a backing storage of the specified PdfObject.
Remarks
If the backing PdfDictionary is null (lazily created when modifying the PdfObject), then the backing PdfDictionary is created, added to the underlying model and returned.
warning
Changes made to the returned PdfDictionary are not verified to be in accordance with the PDF Specification ISO 32000-1:2008 so make them at your own risk.
Exceptions
- System.ArgumentNullException
obj
is null.