pikepdf

Python PDF manipulation library built on the QPDF C++ engine for repairing, merging, splitting, encrypting, decrypting, and compressing PDF files.

Evaluated Mar 06, 2026 (0d ago) v9.x
Homepage ↗ Repo ↗ Developer Tools python pdf pdf-manipulation encryption merge split repair qpdf compression
⚙ Agent Friendliness
68
/ 100
Can an agent use this?
🔒 Security
88
/ 100
Is it safe for agents?
⚡ Reliability
82
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
86
Error Messages
82
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
90
Auth Strength
90
Scope Granularity
85
Dep. Hygiene
82
Secret Handling
90

No network layer; QPDF has a strong security track record; avoid processing untrusted PDFs as malformed inputs can exploit QPDF's C++ parser

⚡ Reliability

Uptime/SLA
80
Version Stability
85
Breaking Changes
80
Error Recovery
82
AF Security Reliability

Best When

You need to structurally manipulate, repair, or transform PDF files at the object level without extracting text.

Avoid When

Your goal is to read text or table content from PDFs — pikepdf provides no text extraction API.

Use Cases

  • Repairing corrupted or malformed PDFs that other tools cannot open
  • Merging multiple PDF documents into a single file programmatically
  • Encrypting PDFs with user and owner passwords or removing existing encryption
  • Splitting a PDF into individual pages or page ranges
  • Reducing PDF file size by removing unused objects and recompressing streams

Not For

  • Extracting text content from PDFs (use PyMuPDF or pdfminer.six for that)
  • OCR on scanned document images (use docTR or Tesseract instead)
  • Rendering PDF pages to images (use PyMuPDF's page.get_pixmap() instead)

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Local Python library — no authentication required

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MPL 2.0 license (Mozilla Public License). Compatible with commercial and proprietary use. QPDF underlying library is also open source (Apache 2.0).

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • pikepdf does NOT provide text extraction — agents that accidentally use it expecting text output will get empty or object-level data
  • Incremental saving (save with incremental=True) is required for certain certified/signed PDFs to preserve digital signatures
  • Opening a PDF in a with block is required to release QPDF resources; forgetting this causes file handle leaks in long-running agents
  • Encrypted PDFs must be opened with the password parameter — there is no automatic detection of whether a password is needed before open() fails
  • Page objects removed from one PDF and added to another must use the make_indirect() method or the resulting PDF will be invalid

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for pikepdf.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered