PdfDocument
Overview
PdfDocument is a class in Aspose.PDF FOSS for Python.
Container for a PDF’s COS object graph.
This class provides 3 methods for working with PdfDocument objects in Python programs.
Available methods include: __init__, get_object, register_object.
All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package.
Properties: objects, trailer, xref_table.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
objects | dict[int, Any] | Read | Gets the objects. |
trailer | PdfDictionary | Read | Gets the trailer. |
xref_table | dict[int, int] | Read | Gets the xref table. |
Methods
| Signature | Description |
|---|---|
__init__() | Calls init on this PdfDocument instance. |
get_object(ref: PdfIndirectReference) → Any | Return the object for ref, or None if it cannot be loaded. |
register_object(obj: PdfObject) → PdfIndirectReference | Register an object and assign it an object number if it does not have one. |