PdfFileEditor
Overview
PdfFileEditor is a class in Aspose.PDF FOSS for Python.
Facade for PDF file editing operations.
This class provides 9 methods for working with PdfFileEditor objects in Python programs.
Available methods include: __init__, add_page_break, append, close, concatenate, delete, dispose, extract, insert.
All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package.
Properties: last_exception.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
last_exception | BaseException | None | Read | Exception from the last failed operation, or None if none. |
Methods
| Signature | Description |
|---|---|
__init__() | Calls init on this PdfFileEditor instance. |
close() | Close the editor and release resources. |
dispose() | Mark the editor as disposed. |
concatenate(inputs: list[str], output: str) → bool | Concatenate multiple PDF files into one. |
extract(source: str, destination: str, page_from: int | None, page_to: int | None) → bool | Extract pages from source to destination. |
insert(source: str, insert_file: str, destination: str, position: int) → bool | Insert pages from one PDF into another. |
delete(source: str, destination: str, pages_to_delete: Any, page_to: int | None, page_from: int | None) → bool | Delete specified pages from a PDF. |
append(source: str, append_source: str, destination: str) → bool | Append pages from one PDF to another. |
add_page_break(input_path: str, output_path: str) → bool | Add a blank page to the PDF. |