pdfrw2
PDF file reader/writer library
What it is and what it does
pdfrw2 is a pure-Python PDF reader and writer library that lets you programmatically manipulate PDF files. It supports operations like extracting and rearranging pages, merging multiple PDFs, rotating pages, modifying metadata, adding watermarks, and embedding portions of one PDF into another using Form XObjects. The library is designed to work standalone or alongside reportlab for creating new PDFs that reuse content from existing ones.
This is a maintained fork of the original pdfrw that fixes bugs including corrupted PDF forms. It has been used in production pre-press workflows and can faithfully reproduce vector images without rasterization. The package has no runtime dependencies, making it lightweight to install. However, the fork itself has not been updated since November 2022, so it may not handle newer PDF features or edge cases introduced after that time.
Use it for:
- Automate PDF page rearrangement for printing (e.g., creating booklets or n-up layouts from existing PDFs)
- Extract images and embedded pages from PDFs to reuse in new documents created with reportlab or rst2pdf
- Batch-modify PDF metadata (title, author, subject) across multiple files without altering document structure
- Split, merge, or rotate pages in PDFs programmatically as part of document processing pipelines
- Add watermarks or overlay graphics to existing PDFs while preserving original navigation and structure
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pdfrw2 reads, writes, and manipulates PDF files with operations including page subsetting, merging, rotating, metadata modification, and watermarking.
Yes, if you need pure-Python PDF manipulation without external dependencies and your PDFs conform to standard formats. The library is stable and has proven track record in production. However, be cautious: the package is abandoned (last commit 2022-11-09), so it may not handle modern PDF features or newly discovered edge cases. Use it for established workflows on well-formed PDFs; avoid it if you need active maintenance or support for cutting-edge PDF specifications.
Install
pdfrw2 on PyPI
pip
pip install pdfrw2uv
uv add pdfrw2poetry
poetry add pdfrw2Installing pdfrw2
Before you install
Low install friction with no runtime dependencies. However, the package is marked as abandoned with the last commit on 2022-11-09, and has not been actively maintained since its November 2021 release.
License in practice
MIT license is permissive, allowing commercial and private use with minimal restrictions. No licensing concerns for adoption.
Quickstart
pip install pdfrw2
from pdfrw import PdfReader, PdfWriter
reader = PdfReader('input.pdf')
writer = PdfWriter()
writer.addpages(reader.pages)
writer.write('output.pdf')
Verify before relying
- Whether the package works reliably on Python versions beyond 3.9 despite no recent updates
- Current state of bug fixes claimed in the fork description and whether all reported issues remain resolved
- Compatibility with modern PDF specifications and recently-generated PDFs
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,718 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 266,839/month — #8,300 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pdfrw2-0.5.0-py2.py3-none-any.whl
Keywords: pdf, vector, graphics, PDF, nup, watermark, split, join, merge
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
pdfrwpdfrw reads, writes, and manipulates PDF files…
permissive · top 5,000 on PyPI
fillpdfFills, flattens, and manipulates PDF forms by…
permissive · top 15,000 on PyPI
pikepdfpikepdf reads, writes, repairs, and transforms…
copyleft · top 5,000 on PyPI
pypdftkPython wrapper that drives the pdftk binary to…
permissive · top 15,000 on PyPI
PyPDF2PyPDF2 is a pure-Python library for reading,…
permissive · top 1,000 on PyPI
PyPDFFormPyPDFForm creates, inspects, styles, and fills…
permissive · top 15,000 on PyPI
PyPDF3PyPDF3 is a pure-Python PDF toolkit for…
permissive · top 15,000 on PyPI
rst2pdfConverts reStructuredText documents directly to…
permissive · top 15,000 on PyPI
playa-pdfPlaya-pdf reads PDF files and exposes their…
permissive · top 15,000 on PyPI
PyPDF4PyPDF4 is a pure-Python PDF toolkit for…
permissive · top 15,000 on PyPI