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

NameTypeAccessDescription
last_exceptionBaseException | NoneReadException from the last failed operation, or None if none.

Methods

SignatureDescription
__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)boolConcatenate multiple PDF files into one.
extract(source: str, destination: str, page_from: int | None, page_to: int | None)boolExtract pages from source to destination.
insert(source: str, insert_file: str, destination: str, position: int)boolInsert pages from one PDF into another.
delete(source: str, destination: str, pages_to_delete: Any, page_to: int | None, page_from: int | None)boolDelete specified pages from a PDF.
append(source: str, append_source: str, destination: str)boolAppend pages from one PDF to another.
add_page_break(input_path: str, output_path: str)boolAdd a blank page to the PDF.

See Also