pdfreader
- Info:
See the pdfreader documentation.
- Author & Maintainer:
Maksym Polshcha <maxp@sterch.net>
pdfreader is a read-only Python PDF parser for extracting text, images, forms, fonts, CMaps, metadata, and other document objects. Use it when you need programmatic access to PDF content and structure without editing the file or rasterizing every page.
The library provides two complementary interfaces:
PDFDocument exposes the document catalog, page tree, indirect objects, streams, and metadata.
SimplePDFViewer interprets page content and writes decoded data to a SimpleCanvas.
What pdfreader provides
Direct access to the document catalog, page tree, indirect objects, streams, and metadata.
Page-level extraction of decoded strings, images, forms, annotations, and inline images through SimpleCanvas.
Support for password-protected documents that use a supported PDF standard security handler.
Conversion of supported PDF image objects to Pillow images.
pdfreader does not create, edit, split, merge, rasterize, or convert PDF files. Extracted text follows content-stream order and does not automatically reconstruct visual lines, columns, or tables.
PDF version compatibility
pdfreader targets the PDF 1.7 data model and recognizes standard %PDF-2.0 file headers. Header recognition does not imply complete support for every feature introduced by ISO 32000-2. See the PDF compatibility guide for the tested boundary and reporting guidance.
Installation
pdfreader is tested on Python 3.6 through Python 3.14. Install it from PyPI with pip:
python -m pip install pdfreader
Quick example
Extract decoded string fragments from the first page:
from pdfreader import SimplePDFViewer
with open("document.pdf", "rb") as stream:
viewer = SimplePDFViewer(stream)
viewer.navigate(1)
viewer.render()
text = "".join(viewer.canvas.strings)
Documentation
Support and source
Use GitHub issues for bug reports, questions, and feature requests. The latest source is available in the GitHub repository.
References
Metadata
Release files for pdfreader 0.1.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdfreader-0.1.16.tar.gz | 2.7 MB | Without provenance | Details for pdfreader-0.1.16.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdfreader-0.1.16-py3-none-any.whl | Python 3 | none | any | Details for pdfreader-0.1.16-py3-none-any.whl |
Total release size: 2.8 MB
Release files / pdfreader-0.1.16.tar.gz
| Download URL | pdfreader-0.1.16.tar.gz |
|---|---|
| Size | 2.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
206265ed60f815b9314917becf948fc80fbb28e6fdd41706184972f32d1067ae
|
|
BLAKE2b-256 checksum How to use checksums |
d371f2ea7983496f9e892e2b1bb685b27eb4e2a35e6ce55aec9e864802f1913e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / pdfreader-0.1.16-py3-none-any.whl
| Download URL | pdfreader-0.1.16-py3-none-any.whl |
|---|---|
| Size | 143.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef9ef123a945cc1a7ec810c356d8806188a3971fe307e03cdfc42688c70ffd82
|
|
BLAKE2b-256 checksum How to use checksums |
c5eccdee978e2ce4f1b835febedf3671b0ac301b66f20201a6776056bf024a8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for pdfreader 0.1.16
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.