skillfed

pdfrw

PDF file reader/writer library

pdfrw v0.4 2.5M downloads/30d#3,009 on PyPI1,911
Permissive license MIT DORMANT released

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 pdfrw

uv

uv add pdfrw

poetry

poetry add pdfrw

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Multimedia :: Graphics :: Graphics ConversionTopic :: PrintingTopic :: Software Development :: LibrariesTopic :: Text ProcessingTopic :: Utilities

Tags

pdf reader writer librarymerge split rotate pdf pagespdf metadata manipulationpure python pdf parserpdf page reorganizationextract pdf imagespdf watermark add
pdf-manipulationpure-pythondormant

More Libraries packages