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

NameTypeAccessDescription
objectsdict[int, Any]ReadGets the objects.
trailerPdfDictionaryReadGets the trailer.
xref_tabledict[int, int]ReadGets the xref table.

Methods

SignatureDescription
__init__()Calls init on this PdfDocument instance.
get_object(ref: PdfIndirectReference)AnyReturn the object for ref, or None if it cannot be loaded.
register_object(obj: PdfObject)PdfIndirectReferenceRegister an object and assign it an object number if it does not have one.

See Also