skillfed

pdfrw2

PDF file reader/writer library

pdfrw2 v0.5.0 266.8K downloads/30d#8,300 on PyPI35
Permissive license MIT Abandoned released

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 pdfrw2

uv

uv add pdfrw2

poetry

poetry add pdfrw2

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Multimedia :: Graphics :: Graphics ConversionTopic :: PrintingTopic :: Software Development :: LibrariesTopic :: Text ProcessingTopic :: Utilities

Tags

pdf read write librarypdf page manipulationpdf merge split rotatepdf metadata editingpure python pdf parserpdf watermark extractpdf form xobject
pdf-processingno-dependencies

More Libraries packages