PdfExtractor
Overview
PdfExtractor is a class in Aspose.PDF FOSS for Python.
Simple PDF text and image extractor.
This class provides 14 methods for working with PdfExtractor objects in Python programs.
Available methods include: __init__, bind_pdf, close, dispose, extract_attachment, extract_image, extract_text, get_attach_names, get_attachment, get_next_image, get_next_page_text, get_text, and 2 additional methods.
All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package.
Properties: password.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
password | str | None | Read/Write | Optional owner/user password used when binding encrypted PDFs (maps .NET Password). |
Methods
| Signature | Description |
|---|---|
__init__() | Calls init on this PdfExtractor instance. |
close() | Close the extractor and release resources. |
dispose() | Mark the extractor as disposed. |
bind_pdf(source: str | Path | bytes, password: str | None, limits: PdfLoadLimits | None) | Bind to a PDF source for extraction. |
extract_text() | Extract text from bound PDF pages. |
get_text() → str | Return all extracted text concatenated. |
get_next_page_text() → str | Return text for the next page, advancing cursor. |
has_next_page_text() → bool | Return True if there is another page’s text available. |
extract_image() | Extract images from bound PDF. |
has_next_image() → bool | Return True if there is another image available. |
get_next_image() → Any | Return the next image, advancing cursor. |
extract_attachment() | Extract attachments from bound PDF. |
get_attachment(name: str) → Any | Return attached file by name. |
get_attach_names() → list[str] | Return list of attachment names. |