IncrementalUpdate

IncrementalUpdate

概述

IncrementalUpdate 是 Aspose.PDF FOSS 中用于 Python 的一个类。

为现有 PDF 生成增量更新部分。

此类提供 8 个方法,用于在 Python 程序中处理 IncrementalUpdate 对象。可用的方法包括:add_new_object、add_object、build_incremental_trailer、build_incremental_xref、find_last_eof、find_startxref、generate、get_next_object_number。在安装了 Aspose.PDF FOSS for Python 包后,所有公共成员对任何 Python 应用程序均可访问。属性:budget、limits、modified_objects、next_obj_num、original_data、original_eof_offset,以及其他 1 项。

属性

名称类型访问描述
original_databytes读写获取或设置原始数据。
limits`PdfLoadLimitsNone`读写
budget`_LoadBudgetNone`读写
original_eof_offsetint读写获取或设置原始 eof 偏移。
next_obj_numint读写获取或设置下一个对象编号。
modified_objectsdict[int, bytes]读写获取或设置已修改的对象。
xref_entrieslist[tuple[int, int, int]]读写获取或设置 xref 条目。

方法

签名描述
find_last_eof() → int返回最后一个 %%EOF 标记的起始索引。
find_startxref() → int返回最后一个 startxref 关键字之后的整数值。
get_next_object_number() → int返回并保留下一个可用的对象编号。
add_object(obj_num: int, obj_bytes: bytes)在增量更新中添加或替换对象。
add_new_object(obj_bytes: bytes) → int添加一个全新的对象并返回其分配的编号。
build_incremental_xref(base_offset: int) → bytes为追加的对象创建 xref 节。
build_incremental_trailer(prev_xref: int, new_size: int, xref_offset: int) → bytes创建一个引用先前 xref 表的 trailer。
generate() → bytes返回完整的增量更新字节。

另请参阅

 中文