pdfrw
PDF file reader/writer library
What it is and what it does
pdfrw is a pure-Python PDF library that reads and writes PDF files without requiring compiled dependencies or external tools. It handles common PDF manipulation tasks—merging multiple PDFs, extracting or reordering pages, rotating content, modifying metadata, and embedding one PDF into another—while preserving vector graphics without rasterization. The library can work standalone or integrate with reportlab to reuse existing PDF content in newly generated documents.
The package comes with command-line examples demonstrating practical workflows: creating booklets, extracting images, adding watermarks, creating posters, and concatenating files. It has been used in production pre-press environments and is noted as the fastest pure-Python PDF parser available. However, the project is dormant—last released 2017-09-18 and tested only through Python 3.6—so it may not support newer Python versions or handle recently introduced PDF features without modification.
Use it for:
- Merge multiple PDFs into a single document or extract specific pages from an existing PDF.
- Rotate pages or reorganize them into booklet layouts for printing without specialized software.
- Add or modify PDF metadata (title, author, subject) programmatically without altering document structure.
- Extract images and embedded pages (Form XObjects) from existing PDFs to reuse in new documents.
- Generate watermarked PDFs by overlaying one PDF image on top of another.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pdfrw reads, writes, and manipulates PDF files in pure Python, supporting operations like merging, subsetting, rotating, and metadata modification without external dependencies.
Yes, if you need lightweight, dependency-free PDF reading and basic manipulation in Python and can accept that the package is no longer actively developed. It works well for straightforward tasks like merging, subsetting, and metadata changes. No, if you require support for modern Python versions beyond 3.6, active maintenance, or handling of complex or recently encrypted PDFs.
Install
pdfrw on PyPI
pip
pip install pdfrwuv
uv add pdfrwpoetry
poetry add pdfrwInstalling pdfrw
Before you install
Installation is frictionless with no runtime dependencies. The package is dormant (last release 2017-09-18, last commit 2024-04-29), so while the repository shows ongoing maintenance, it receives no active development.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects without licensing concerns.
Quickstart
pip install pdfrw
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 with Python versions beyond 3.6, given its dormant status.
- Current compatibility with contemporary PDF formats and encryption standards.
- Performance characteristics for large-scale PDF processing compared to alternatives.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 3,252 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,543,756/month — #3,009 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pdfrw-0.4-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
pdfrw2pdfrw2 reads, writes, and manipulates PDF files…
permissive · top 15,000 on PyPI
pypdftkPython wrapper that drives the pdftk binary to…
permissive · top 15,000 on PyPI
pikepdfpikepdf reads, writes, repairs, and transforms…
copyleft · top 5,000 on PyPI
playa-pdfPlaya-pdf reads PDF files and exposes their…
permissive · top 15,000 on PyPI
fillpdfFills, flattens, and manipulates PDF forms by…
permissive · top 15,000 on PyPI
PyPDF2PyPDF2 is a pure-Python library for reading,…
permissive · top 1,000 on PyPI
PyPDF3PyPDF3 is a pure-Python PDF toolkit for…
permissive · top 15,000 on PyPI
PyPDF4PyPDF4 is a pure-Python PDF toolkit for…
permissive · top 15,000 on PyPI
PyPDFFormPyPDFForm creates, inspects, styles, and fills…
permissive · top 15,000 on PyPI
gotenberg-clientA fully-typed Python client for the Gotenberg…
copyleft · top 15,000 on PyPI