IncrementalUpdate

IncrementalUpdate

Overview

IncrementalUpdate is a class in Aspose.PDF FOSS for Python.

Generate an incremental update section for an existing PDF.

This class provides 8 methods for working with IncrementalUpdate objects in Python programs. Available methods include: add_new_object, add_object, build_incremental_trailer, build_incremental_xref, find_last_eof, find_startxref, generate, get_next_object_number. All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package. Properties: budget, limits, modified_objects, next_obj_num, original_data, original_eof_offset, and 1 more.

Properties

NameTypeAccessDescription
original_databytesRead/WriteGets or sets the original data.
limitsPdfLoadLimits | NoneRead/WriteGets or sets the limits.
budget_LoadBudget | NoneRead/WriteGets or sets the budget.
original_eof_offsetintRead/WriteGets or sets the original eof offset.
next_obj_numintRead/WriteGets or sets the next obj num.
modified_objectsdict[int, bytes]Read/WriteGets or sets the modified objects.
xref_entrieslist[tuple[int, int, int]]Read/WriteGets or sets the xref entries.

Methods

SignatureDescription
find_last_eof()intReturn the start index of the last %%EOF marker.
find_startxref()intReturn the integer value after the last startxref keyword.
get_next_object_number()intReturn and reserve the next free object number.
add_object(obj_num: int, obj_bytes: bytes)Add or replace an object in the incremental update.
add_new_object(obj_bytes: bytes)intAdd a brand-new object and return its assigned number.
build_incremental_xref(base_offset: int)bytesCreate an xref section for the appended objects.
build_incremental_trailer(prev_xref: int, new_size: int, xref_offset: int)bytesCreate a trailer referencing the previous xref table.
generate()bytesReturn the full incremental update bytes.

See Also