pdfmux logo

pdfmux

NameetP/pdfmux

PDF extraction with self-healing and cost-aware mechanisms

GraphCanon updated 1w · GitHub synced 1w

79 stars12 forksLast push 1w Python MIT

Decision brief

pdfmux offers efficient PDF extraction with self-healing, no AI required, at various cost modes.

Good fit when

  • You need high accuracy without LLMs or GPUs.
  • Handling diverse document types including scanned PDFs.

Avoid when

  • Require real-time GPU-based AI processing for speed.
  • Working with non-PDF file formats as sole tool.

Observed Jul 12, 2026 · Source: enrich:decision_facts

Verify the decision

Maintenance and security

Full trust report
Maintenance
Very active (1d since push)
As of 1w
Provenance
Not a fork · Personal account
As of 1w
Security (OSV)
1 medium (1 medium)
As of 1mo

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Install

pip install pdfmux
PyPI

How it fits your stack(1)

Typed graph edges - alternatives, integrations, successors, and dependencies. Ranked by relationship type, not raw GitHub stars.

Similar tools

Same-category neighbours not already linked as typed edges.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

A Python library for extracting information from PDF documents, supporting various optimization modes that balance accuracy and cost.

Capability facts

Deploy
Self-host

Source: dockerfile:Dockerfile · Aug 15, 2026

Docker
Dockerfile present

Source: dockerfile:Dockerfile · Aug 15, 2026

CLI
CLI entrypoint

Source: pyproject.toml:[project.scripts] · Aug 15, 2026

MCP server
No MCP server detected

Source: repo_scan · Aug 15, 2026

Languages
python

Source: github.language+pyproject.toml · Aug 15, 2026

Categories

Compatibility

Sourced claims from the README excerpt - not unsourced marketing copy.

Python runtimePython

Source: README excerpt (regex_v1, Aug 15, 2026)

Requires Python 3.11+.
Source link

Tags

README

Install

pip install pdfmux

That handles digital PDFs. For any real-world batch, install pdfmux[ocr] too — almost every directory of PDFs has at least one scan, and without OCR those pages return empty text:

pip install "pdfmux[ocr]"             # ⭐ recommended — RapidOCR for scanned pages (~200MB, CPU)

Other backends, by document type:

pip install "pdfmux[tables]"          # Docling — table-heavy docs (~500MB)
pip install "pdfmux[opendataloader]"  # OpenDataLoader — complex layouts (Java 11+)
pip install "pdfmux[marker]"          # Marker — neural extraction for academic papers
pip install "pdfmux[llm]"             # Gemini fallback (default LLM)
pip install "pdfmux[llm-claude]"      # Claude (Sonnet / Opus)
pip install "pdfmux[llm-openai]"      # GPT-4o family
pip install "pdfmux[llm-ollama]"      # Ollama (any local model)
pip install "pdfmux[llm-mistral]"     # Mistral OCR API ($0.002/page)
pip install "pdfmux[llm-all]"         # all LLM providers (incl. Gemma via Gemini key)
pip install "pdfmux[watch]"           # `pdfmux watch <dir>` auto-convert on change
pip install "pdfmux[all]"             # everything

Requires Python 3.11+.


cost-aware extraction with budget cap

pdfmux convert report.pdf --mode economy --budget 0.50


predict cost before running anything

pdfmux estimate big-report.pdf --llm-provider gemini


│ Extractor │ Status │ Version │ Install │


│ Docling │ missing │ -- │ pip install pdfmux[tables] │


│ Surya │ missing │ -- │ pip install pdfmux[ocr-heavy] │


{"event":"classified","page_count":312,"plan":"pymupdf+gemini-fallback"}


Default install — already includes python-bidi for RTL reordering

pip install pdfmux


Cost Modes

ModeBehaviorTypical cost
economyRule-based backends only. No LLM calls.$0/page
balancedLLM only for pages that fail rule-based extraction.~$0.002/page avg
premiumLLM on every page for maximum quality.~$0.01/page

Set a hard budget cap: --budget 0.50 stops LLM calls when spend reaches $0.50 per document.


License

The pdfmux library and MCP server in this repository are MIT licensed — free for any use, and every released version stays MIT.

The confidence-budgeted decision-trace method (the persisted per-page decision trace with retained rejected candidates, and the monotonic repair guard) is patent-pending (US Provisional App No. 64/106,302) and is reserved for pdfmux Cloud/Pro under a separate commercial license — it is not part of the MIT grant. See LICENSING.md and NOTICE.

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.