pdfmux logo

pdfmux

Free

PDF-to-Markdown extraction with per-page confidence scoring and self-healing fallback. Native LangChain document loader (`PdfmuxLoader`); built for RAG pipelines that can't tolerate silent extraction failures. ![GitHub Repo stars](https://img.shields.io/github/stars/NameetP/pdfmux?style=social)

FreeFree tier
Type
Open Source

About pdfmux

pdfmux is an open-source PDF extraction tool that self-heals by re-extracting failed pages and certifies any extractor's output. It acts as a router that sends each page to the best of seven built-in backends (PyMuPDF, OpenDataLoader, RapidOCR, Docling, Surya, Marker, Mistral OCR) or a BYOK LLM fallback (Gemini, Claude, GPT-4o, Ollama). It provides per-page confidence scoring, flags pages it cannot read instead of silently dropping them, and offers a verify command to audit any extraction engine's output. Native integrations include a LangChain document loader (PdfmuxLoader), LlamaIndex loader, and an MCP server for Claude Desktop. Free, MIT licensed, with an easy pip install.

Key Features

Self-healing extraction: re-extracts failed pages with stronger backends and flags what it cannot read
Per-page confidence scoring and audit of extraction quality
Certify any extractor's output with pdfmux verify (v1.8.1+) – detects silently dropped pages
Routes each page to the best of 7 built-in backends (PyMuPDF, OpenDataLoader, RapidOCR, Docling, Surya, Marker, Mistral OCR)
BYOK LLM fallback (Gemini, Claude, GPT-4o, Ollama) configurable via YAML
Native LangChain document loader (PdfmuxLoader) and LlamaIndex loader
MCP server for Claude Desktop
Supports digital PDFs, scanned documents (OCR), table-heavy docs, academic papers, complex layouts
Outputs Markdown, JSON, or document chunks
Free and open source (MIT license), patent-pending method

Pros & Cons

Pros
  • Self-healing mechanism catches and re-extracts silently dropped or garbled pages
  • Certification feature allows you to audit any extraction engine for missing content
  • Multiple extraction backends (including LLM fallback) ensure broad PDF type coverage
  • Easy installation via pip with optional extras for OCR, tables, and LLMs
  • Integrates natively with LangChain and LlamaIndex for RAG pipelines
  • Free and open source (MIT), no API key required for basic usage
Cons
  • OCR and some backends require additional dependencies (e.g., Java 11+ for OpenDataLoader, large models for Surya)
  • LLM fallback incurs API costs and requires API keys
  • Relatively new project with a smaller community and fewer integrations than established tools
  • Performance may vary depending on the complexity of PDF and chosen backends

Best For

RAG pipelines requiring high-reliability document extractionExtracting text, tables, and layout from academic papers and scanned PDFsBatch processing directories of mixed PDFs (digital and scanned)Validating the output of commercial PDF extractors (e.g., LlamaParse, Mistral OCR, Reducto)Building document processing workflows with LangChain or LlamaIndexDesktop document extraction via MCP server for Claude Desktop

FAQ

What is pdfmux?
pdfmux is an open-source PDF extraction tool that self-heals by re-extracting failed pages and optionally certifies any extractor's output for silent drops. It routes each page to the best of multiple backends.
Is pdfmux free?
Yes, pdfmux is completely free and open source under the MIT license.
How do I install pdfmux?
Install via pip: pip install pdfmux. For OCR support, use pip install 'pdfmux[ocr]'. Additional extras include [tables], [opendataloader], [marker], and [llm] with specific LLM providers.
What extraction backends does pdfmux support?
It includes 7 backends: PyMuPDF (digital text), OpenDataLoader (complex layouts), RapidOCR (scanned pages CPU), Docling (tables, 97.9% TEDS), Surya (heavy OCR), Marker (academic papers), and Mistral OCR (API, 96.6% tables). Additionally, you can configure a BYOK LLM fallback (Gemini, Claude, GPT-4o, Ollama).
Can pdfmux certify outputs from other PDF extractors?
Yes, starting in v1.8.1, pdfmux verify audits any extraction engine's output against the source PDF and reports which pages were silently dropped.
Does pdfmux integrate with LangChain?
Yes, pdfmux provides a native LangChain document loader called PdfmuxLoader, and also supports LlamaIndex and an MCP server for Claude Desktop.