Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

pdf-redactor

github.com

  • Free plan
  • Linux
  • Self-hosted
6.9 Club score Visit github.com

What pdf-redactor is

pdf-redactor is a free, open-source Python library for redacting text layers and metadata in PDF files. It can process page text, plain-text annotations, link target URLs, the Document Information Dictionary, and embedded XMP metadata. Regular-expression substitutions can replace selected text, such as masking Social Security numbers. Metadata fields and XML metadata can be rewritten, removed, or added. The project uses pdfrw to parse and write PDFs and recommends qpdf for decompressing and recompressing files when necessary. Its intended workflow is a Python library with text-filtering functions written by the user; the command-line version does not yet modify PDFs by itself. Graphical elements, images, and other embedded resources remain untouched. The tool does not inspect several components, including embedded files, multimedia, scripts, forms, internal object names, and digital signatures. Unusual fonts can interfere with matching or replacement rendering. It is designed for self-hosted, on-premises use and carries a CC0 1.0 Universal license.

Who it suits

pdf-redactor suits developers who need programmable PDF text and metadata redaction in a self-hosted Python workflow.

Good to know, and what to watch

  • Free open-source CC0 project
  • Regular-expression text substitutions
  • Edits document and XMP metadata
  • Python library for custom filters
  • Handles PDF text layers
  • Command-line version does not modify PDFs
  • Images and graphics remain untouched
  • Several PDF components are not inspected
  • Unusual fonts can disrupt processing

The verdict

pdf-redactor offers focused, scriptable handling of PDF text and metadata. It is not a complete document scrubber, so users must account for unsupported content and prepare compressed files when needed.

What the maker publishes

Authors
The README credits Joshua Tauberer and Antoine McGrath. source
Command-line status
The README says the command-line version does not yet actually do anything to the PDF. source
Compression guidance
The README recommends using qpdf to decompress PDFs before processing and to recompress and linearize them afterward because pdfrw does not support all content-stream compression methods. source
Compression limit
Because pdfrw does not support all content-stream compression methods, the README recommends decompressing PDFs with qpdf before processing them. source
Content it handles
It can process page text, plain-text annotations, link target URLs, document information metadata, and embedded XMP metadata. source
Content not touched
Graphical elements, images, and other embedded resources are not touched. source
Coverage limits
The README says it does not inspect some PDF components, including embedded files, multimedia, scripts, forms, internal object names, and digital signatures. source
Font limit
Unusual fonts may not be processed correctly, which can prevent text patterns from matching or replacement text from rendering correctly. source
Font limitation
Unusual fonts may not be processed correctly because the tool has limited understanding of glyph-to-Unicode mappings. source
Implementation dependency
The project uses pdfrw to parse and write PDFs. source
Integration
The project uses pdfrw to parse and write PDFs, and recommends qpdf to decompress and recompress PDFs when needed. source
License
The repository includes a CC0 1.0 Universal license. source
License
The repository displays a CC0-1.0 license. source
Maker
The README credits Joshua Tauberer and Antoine McGrath as the authors. source
Metadata
It can rewrite, remove, or add document metadata fields and XML metadata. source
Metadata editing
It can rewrite, remove, or add metadata fields and XML metadata through functions operating on the parsed XMP DOM. source
Partial coverage
The README lists embedded files, multimedia, scripts, rich-text annotations, forms, internal object names, and digital signatures among PDF content it does not scan. source
Purpose
pdf-redactor is a general-purpose PDF text-layer redaction tool written in pure Python. source
Purpose
pdf-redactor is a general-purpose PDF text-layer redaction tool written in pure Python. source
Python library
The README recommends using pdf_redactor as a library with Python text-filtering functions; it also documents Python 3 installation and a Python 3 command-line invocation. source
Redaction targets
It can process page text, plain text annotations, link target URLs, the Document Information Dictionary, and embedded XMP metadata. source
Text redaction
It supports regular-expression text substitution, such as replacing Social Security numbers with a mask. source
Text substitution
It supports regular-expression text substitution, such as replacing Social Security numbers with a chosen string. source
Use
The README recommends using the Python module as a library with user-written text filters; the command-line version does not yet do anything to the PDF by itself. source

Checked against the maker's pages on 9 Oct 2026.