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
| Name | Type | Access | Description |
|---|---|---|---|
original_data | bytes | Read/Write | Gets or sets the original data. |
limits | PdfLoadLimits | None | Read/Write | Gets or sets the limits. |
budget | _LoadBudget | None | Read/Write | Gets or sets the budget. |
original_eof_offset | int | Read/Write | Gets or sets the original eof offset. |
next_obj_num | int | Read/Write | Gets or sets the next obj num. |
modified_objects | dict[int, bytes] | Read/Write | Gets or sets the modified objects. |
xref_entries | list[tuple[int, int, int]] | Read/Write | Gets or sets the xref entries. |
Methods
| Signature | Description |
|---|---|
find_last_eof() → int | Return the start index of the last %%EOF marker. |
find_startxref() → int | Return the integer value after the last startxref keyword. |
get_next_object_number() → int | Return 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) → int | Add a brand-new object and return its assigned number. |
build_incremental_xref(base_offset: int) → bytes | Create an xref section for the appended objects. |
build_incremental_trailer(prev_xref: int, new_size: int, xref_offset: int) → bytes | Create a trailer referencing the previous xref table. |
generate() → bytes | Return the full incremental update bytes. |