pyropdf
Read, render, and edit PDFs in Python. Undo your edits.
pyropdf combines a Python API with a Rust core: extract text and tables, render pages, fill forms, and annotate documents in one package. Transactions group edits into one undoable step; a failed transaction leaves the document as it was.
Documentation · Recipes · API reference · Choosing a PDF library · Japanese docs
See it work
| Read an invoice | Highlight, fill, and stamp it |
|---|---|
These are real pyropdf renders. Walk through the four steps, open the resulting PDF, or reproduce the images.
Try it
Python 3.11–3.15 on Linux, macOS, and Windows, including free-threaded CPython. No required dependencies; OCR and CJK fallback fonts are optional extras.
pip install pyropdf
Run this in an empty directory. It creates its own PDF, highlights the total, renders a preview, undoes and redoes the highlight, and saves the result. No sample download or account is needed.
import pyropdf
with pyropdf.Document() as doc:
page = doc.pages.new((360, 240))
with page.draw() as canvas:
canvas.text("Invoice total: $42", (30, 60),
font=pyropdf.Font.standard("Helvetica"), size=20)
source = doc.to_bytes()
with pyropdf.open(source) as doc:
page = doc.pages[0]
print(page.text().strip())
with doc.transaction("highlight total"):
page.annotations.add(pyropdf.Highlight(page.search("$42")))
page.pixmap(dpi=144).save("reviewed.png")
doc.history.undo()
print("After undo:", len(page.annotations))
doc.history.redo()
doc.save("reviewed.pdf", incremental=True)
Output:
Invoice total: $42
After undo: 0
Open reviewed.png or reviewed.pdf to see the highlighted total.
For an existing file, use pyropdf.open("input.pdf").
What can I build?
| Task | Start here |
|---|---|
| Extract text, words, tables, Markdown, or retrieval chunks | Reading content |
| Turn PDF pages into PNG, JPEG, or SVG | Rendering |
| Fill forms, highlight text, stamp pages, or draw content | Editing |
| Read scanned documents with offline OCR | OCR |
| Undo/redo edits, save incrementally, encrypt, or sign | Versions and saving |
Why pyropdf?
- Reversible edits. Group changes in a named transaction and undo or
redo them through
doc.history. Exceptions discard the whole transaction. - One document for reading, rendering, and editing. All engines read the same versioned object store. Preview an edit before saving it.
- Incremental saves. Append changed objects while keeping the original
file's bytes intact. Inspect
doc.changes()before saving. - MIT licensed. Use it in open-source or commercial applications.
Choosing pyropdf compares capabilities and limitations with PyMuPDF, pypdf, and pikepdf. DESIGN.md explains the architecture.
Status and limits
0.4 series, alpha. The API may change between minor versions. Release notes describe each release. See status and safety for current coverage and limitations.
No pyropdf release claims safety for untrusted input before hayro's bounded
construction (I2, #15) is
released. DocumentLimits bounds the work of an operation, but it is not
that claim.
Contributing
For your first contribution, browse the available good first issues and leave a comment on the one you would like to take.
CONTRIBUTING.md explains how to build, test, and propose a change, and SECURITY.md how to report a vulnerability.
If pyropdf is useful to you, star the repository to find it again. A small reproducible example in an issue helps improve it for your use case.
Metadata
Release files for pyropdf 0.4.1
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 |
|---|---|---|---|---|
| pyropdf-0.4.1.tar.gz | 2.1 MB | With provenance | Details for pyropdf-0.4.1.tar.gz |
Built distributions (wheels)
Total release size: 138.5 MB
Release files / pyropdf-0.4.1.tar.gz
| Download URL | pyropdf-0.4.1.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
778b140aac93ce8d18a73d9f0d6efab8dbbffa639d7bc407cdd9d7eb707edc8c
|
|
BLAKE2b-256 checksum How to use checksums |
fb7064535bfb577b94157731992e84bac7ec3384e11d6db4f770cd9221cdaa15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp315-cp315t-win_amd64.whl
| Download URL | pyropdf-0.4.1-cp315-cp315t-win_amd64.whl |
|---|---|
| Size | 9.2 MB |
| Tags | CPython 3.15 CPython 3.15 free-threading Windows x86-64 |
|
SHA-256 checksum How to use checksums |
033a7dccdce7b9f28514191b5d65cd4d60ad2748a8496b6e6e56c217034b4630
|
|
BLAKE2b-256 checksum How to use checksums |
968e47ec695850f4aa35343dd60066b25bd9b3af316ebfb109aeef2ec8088aeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | pyropdf-0.4.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 9.1 MB |
| Tags | CPython 3.15 CPython 3.15 free-threading Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
e85d225221489b44b09f6f1414de764692cdcc7f403a786c94c3789732fb6485
|
|
BLAKE2b-256 checksum How to use checksums |
2924620606896ae2c41a1d4bb6bd4d5be7d181139ede5a6274d9c18d2d4aa38a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | pyropdf-0.4.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 8.5 MB |
| Tags | CPython 3.15 CPython 3.15 free-threading Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
5009624986666a1bef78e8e6f4af50c70996e920912a9db6af7b4d4cc51cfade
|
|
BLAKE2b-256 checksum How to use checksums |
5be6195bf0111604ef02e8fa7104274b5851d7542daf62ba2b11a353eb3ee08b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp315-cp315t-macosx_11_0_arm64.whl
| Download URL | pyropdf-0.4.1-cp315-cp315t-macosx_11_0_arm64.whl |
|---|---|
| Size | 7.9 MB |
| Tags | CPython 3.15 CPython 3.15 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6a3262ced102a467649c5271676e8ac891455d45aaa81a416b687d53902b29ce
|
|
BLAKE2b-256 checksum How to use checksums |
d32e140baffd1f12f747d9d60d9491850b334794e4603da3f8c389315111b5a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp315-cp315t-macosx_10_12_x86_64.whl
| Download URL | pyropdf-0.4.1-cp315-cp315t-macosx_10_12_x86_64.whl |
|---|---|
| Size | 8.8 MB |
| Tags | CPython 3.15 CPython 3.15 free-threading macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
8c93b6256b3e80c7d566f1f99a580c18554acab7b7321947836a5bf57986707f
|
|
BLAKE2b-256 checksum How to use checksums |
67b2528cee57837f6aaf615065f3514550f715bd1d1488c6b29a4b420f46a5e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp314-cp314t-win_amd64.whl
| Download URL | pyropdf-0.4.1-cp314-cp314t-win_amd64.whl |
|---|---|
| Size | 9.2 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7f5c12c04b5f6514d7062e9c4d3e05a8d0fbd684903880a9ce245fae66bc6906
|
|
BLAKE2b-256 checksum How to use checksums |
6cd307396f8d5120f7973f7b7f5e689c096fe32f239e571fd9bdaa10d3e3966a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | pyropdf-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 9.1 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
c27d02113deba5c0efc9dac430531fc6993be9fb84ebe884013f3d1f86377dd9
|
|
BLAKE2b-256 checksum How to use checksums |
6ab03ad8f70df39a02fee65813f97f09b9573f872db4b227888e8b43c33bc027
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | pyropdf-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 8.5 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
8319864d8b3285d7acae715e26831d90954e3f01a10de915efe5823f0e250af6
|
|
BLAKE2b-256 checksum How to use checksums |
f30a97595db90dc29b4f4da2592fe3e84ff9489e46690070e5b0435b460069a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl
| Download URL | pyropdf-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl |
|---|---|
| Size | 7.9 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
57af51721af29ce033836cee614913a088327abbe50b1f517dc83032f4d7524a
|
|
BLAKE2b-256 checksum How to use checksums |
15dbd5140196aa8ddaf0bbf734bb0eef9da25c0d7a300caae09ba8542d307789
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp314-cp314t-macosx_10_12_x86_64.whl
| Download URL | pyropdf-0.4.1-cp314-cp314t-macosx_10_12_x86_64.whl |
|---|---|
| Size | 8.8 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
9d5670af4693fda6e8ea8f1041b890e92bd66c98a87d057593309705ba1762b5
|
|
BLAKE2b-256 checksum How to use checksums |
1b4357af7169dac2a0993ac582c0fa156fc4e8b3ceb7e3220651a2bd1d45b06b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp311-abi3-win_amd64.whl
| Download URL | pyropdf-0.4.1-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 9.0 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
01a917e0a48bddcc49b1d8f7cdba354cedbb312c1e79342e317f8b20b923f2d1
|
|
BLAKE2b-256 checksum How to use checksums |
f6143c6da9e26fb10cabc53e353deb6ff41bf7b3a9c86c6e9d51ecd45b960312
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp311-abi3-pyemscripten_2026_0_wasm32.whl
| Download URL | pyropdf-0.4.1-cp311-abi3-pyemscripten_2026_0_wasm32.whl |
|---|---|
| Size | 6.7 MB |
| Tags | CPython 3.11 PyEmscripten 2026.0+ WebAssembly abi3 |
|
SHA-256 checksum How to use checksums |
10179377159da49306466cc517bab7bd4d5e390286acabe5d27df5c25a2639bd
|
|
BLAKE2b-256 checksum How to use checksums |
b98c30e111d89b01e38a27d5c06b354015674f07d55720d841825d981caf6b10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | pyropdf-0.4.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 8.9 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
dc1de34427c9b414745d6906746102f710c5b514cb338c6468e54635426e4f8c
|
|
BLAKE2b-256 checksum How to use checksums |
928912c1d8339d71afeaf19d349fcfcd11a464d680560c5f5c35395a09727ca9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | pyropdf-0.4.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 8.3 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
e5daf86934eeb3f27df22698b32b50d96708236917b11f820a6ca10ced5798e3
|
|
BLAKE2b-256 checksum How to use checksums |
4e358b46970e1b196dba373a37fccfdd6998bc56ccbee6402f01be57ba4fcaea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | pyropdf-0.4.1-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 7.7 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a326a1786d0caef9a421a2b050504d92d3f057898be18745b5692955613b35eb
|
|
BLAKE2b-256 checksum How to use checksums |
05fee6325b92a7ce425b95f4b0e9c5418516f106b0737293f02c4f93d1bbe4b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / pyropdf-0.4.1-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | pyropdf-0.4.1-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 8.6 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
8987908b007289d79adc0df92d707db0ff1211baa966a822437a6f2760c10157
|
|
BLAKE2b-256 checksum How to use checksums |
4da1ef1d5ed06cba31388904790b1d00b36101080b0d8494372878674ac13964
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logSecurity for pyropdf 0.4.1
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.
Full provenance
All 17 files in this release have been uploaded with provenance metadata.
Attestation for pyropdf-0.4.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logA 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.