PdfFileEditor
PdfFileEditor
概述
PdfFileEditor 是 Aspose.PDF FOSS 中用于 Python 的类。
PDF 文件编辑操作的外观。
此类提供 9 个方法,用于在 Python 程序中处理 PdfFileEditor 对象。可用的方法包括:__init__、add_page_break、append、close、concatenate、delete、dispose、extract、insert。安装 Aspose.PDF FOSS for Python 包后,所有公共成员对任何 Python 应用程序均可访问。属性:last_exception。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
last_exception | `BaseException | None` | 读取 |
方法
| 签名 | 描述 |
|---|---|
__init__() | Calls init 在此 PdfFileEditor 实例上。 |
close() | 关闭编辑器并释放资源。 |
dispose() | 将编辑器标记为已释放。 |
concatenate(inputs: list[str], output: str) → bool | 将多个 PDF 文件合并为一个。 |
| `extract(source: str, destination: str, page_from: int | None, page_to: int |
insert(source: str, insert_file: str, destination: str, position: int) → bool | 将一个 PDF 的页面插入另一个 PDF。 |
| `delete(source: str, destination: str, pages_to_delete: Any, page_to: int | None, page_from: int |
append(source: str, append_source: str, destination: str) → bool | 将一个 PDF 的页面追加到另一个 PDF。 |
add_page_break(input_path: str, output_path: str) → bool | 向 PDF 添加空白页。 |