pdfmux/blog
alternatives

PyMuPDF Alternatives, Ranked by Real Benchmark Scores (Not Just Stars)

TL;DRLooking for PyMuPDF alternatives? Compare the top PDF extraction tools including pdfmux, pdfplumber, Marker, Docling, and more — with real opendataloader-bench scores.

Direct answer: The best PyMuPDF alternative depends on what you’re optimizing for. For most teams building LLM/RAG pipelines, pdfmux is the top pick — MIT-licensed, 0.903 overall on opendataloader-bench, and it uses PyMuPDF internally for digital pages so you keep PyMuPDF’s speed without its AGPL license or its raw-text-only output. If you need character-level coordinates for visual debugging, pdfplumber is still the right tool. If you’re already committed to heavy ML models for maximum table accuracy, Docling (0.877) edges out PyMuPDF-based wrappers. The rest of this post breaks down why developers look for alternatives in the first place, how six of them actually score on a shared 200-PDF benchmark, and which one fits your specific constraints.

Why Developers Look for PyMuPDF Alternatives

PyMuPDF (fitz) is a powerful, high-performance PDF library with 11.2k GitHub stars. So why are developers searching for alternatives?

  • AGPL-3.0 license — the biggest dealbreaker. AGPL requires you to open-source your entire application if you distribute it. Commercial licenses from Artifex (PyMuPDF’s maintainer) exist but are priced per-developer and negotiated case by case.
  • Complex API — PyMuPDF’s low-level API requires significant boilerplate for common extraction tasks like iterating blocks, spans, and bounding boxes just to reconstruct reading order.
  • Poor LLM output — raw text extraction lacks structure; you need the separate pymupdf4llm wrapper for usable markdown, and even then it scores 0.802 overall on opendataloader-bench — well behind the leaders.
  • Heavy installation for what it does — the C bindings make PyMuPDF non-trivial to build from source in restricted environments (musl-based containers, some serverless runtimes), even though the compiled wheel itself is reasonably small.
  • Table extraction — basic compared to specialized tools; PyMuPDF has no table-structure model, so you either accept raw text or pair it with Camelot/pdfplumber for tables specifically.

Top PyMuPDF Alternatives

1. pdfmux — Best Overall Alternative

pdfmux is a self-healing extraction pipeline built for AI/LLM workflows. It classifies each page, routes digital pages to PyMuPDF, table-heavy pages to Docling, and scanned pages to OCR, then audits every page and re-extracts anything that fails — producing clean Markdown and structured JSON from any PDF in a few lines of code.

pdfmux PyMuPDF
License MIT AGPL-3.0
Output Markdown, JSON Raw text
Tables 0.911 TEDS (opendataloader-bench) No table model
Overall benchmark score 0.903 0.802 (via pymupdf4llm wrapper)
Install ~20 MB base ~30 MB (wheel)

Pros: MIT license, structured output, best-in-class heading detection (0.847), minimal code, uses PyMuPDF internally so you don’t lose its speed on digital pages Cons: No PDF manipulation (merge, split, annotate) — pdfmux is an extraction layer, not a general PDF toolkit. Optional backends add weight: pdfmux[tables] pulls in Docling (~500 MB), pdfmux[ocr] pulls in RapidOCR (~200 MB).

See the full head-to-head in pdfmux vs PyMuPDF for benchmark detail and migration code.

2. pdfplumber — Best for Detailed Extraction

pdfplumber (10.9k stars) excels at character-level extraction and visual debugging. It exposes every character’s bounding box, font, and size, which makes it the tool of choice for data journalism, precise table scraping on bordered tables, and anyone who needs to visually verify what was extracted and why. It isn’t part of opendataloader-bench’s markdown/structure evaluation — its value is coordinate-level control, not benchmark accuracy.

Pros: Character coordinates, visual debugging (page.to_image() overlays), strong extraction on bordered tables, MIT license Cons: Slow on large batches (pure Python, no native layout model), no markdown output, verbose API for anything beyond “give me the text”

3. Marker — Best for Scanned Documents

Marker (41.1k stars — the fastest-growing project on this list) uses a deep-learning pipeline for PDF-to-markdown conversion. It’s excellent on scanned and academic documents with equations, and scores 0.861 overall / 0.890 reading order on opendataloader-bench — ahead of PyMuPDF’s pymupdf4llm wrapper on every axis except raw speed.

Its licensing is two separate things, not one: the Marker code is Apache 2.0 (permissive), but the model weights it downloads at runtime ship under a modified Open RAIL-M license — free for research, personal use, and companies under roughly $5M in funding or revenue, with different terms above that threshold. Read both licenses before shipping it inside a paid product; see PyMuPDF vs Marker for the full breakdown.

Pros: Strong OCR, handles equations, supports EPUB/MOBI input, best reading-order score of any single-engine tool on this list besides pdfmux Cons: GPU recommended for usable speed (1-10s/page on CPU vs 0.3-1s on GPU), multi-GB install once PyTorch and model checkpoints are pulled, Open RAIL-M weights license needs a compliance read before commercial use

4. Docling — Best Multi-Format Alternative

IBM’s Docling (71.2k stars — by far the largest community of any tool here) handles PDFs, DOCX, PPTX, and more with ML-based layout analysis. It scores 0.877 overall / 0.887 tables on opendataloader-bench — the highest single-engine table score of any tool measured, including pdfmux’s own Docling-backed table path.

Pros: Multi-format (not PDF-only), MIT license, LangChain/LlamaIndex adapters, highest single-engine table accuracy measured Cons: ~500 MB install with model download, 30-60s cold start to load models, processes every page through ML even when a page is plain digital text — wasteful if most of your corpus doesn’t need it

5. pypdf — Best Lightweight Alternative

pypdf (10.3k stars) is a pure-Python library for basic PDF operations. No C dependencies, no compiled bindings — it installs anywhere Python runs, including restricted and air-gapped environments where PyMuPDF’s wheel can be a problem.

Pros: Pure Python, BSD license, good for simple extraction, merge/split/rotate support (things pdfmux and Marker don’t do at all) Cons: Lower accuracy on complex layouts, no table-structure extraction, no OCR — not in opendataloader-bench because it isn’t trying to solve markdown/structure extraction

6. Unstructured — Best for Enterprise ETL

Unstructured (15.8k stars) is a document processing platform supporting 20+ file types beyond PDF. Its open-source core scores 0.788 overall / 0.701 tables on opendataloader-bench — the lowest of the six tools benchmarked here, though it’s optimizing for format breadth rather than per-PDF accuracy.

Pros: Multi-format, enterprise features, SOC 2 platform option for teams that want a managed pipeline instead of a library Cons: 1 GB+ install, complex setup for the open-source path, lowest PDF-specific accuracy of the benchmarked tools here

Benchmark scores: opendataloader-bench (200 real-world PDFs)

Four of the six tools above are measured on the same shared benchmark — opendataloader-bench, 200 PDFs spanning financial filings, academic papers, legal contracts, and government documents. pdfplumber and pypdf aren’t included because they don’t attempt markdown/structure extraction, which is what the benchmark scores — their value is coordinate access and basic manipulation, not ranked accuracy.

Tool Overall Tables (TEDS) Reading order License
pdfmux 0.903 0.911 0.920 MIT
Docling 0.877 0.887 0.900 MIT
marker 0.861 0.808 0.890 Apache 2.0 (code) + Open RAIL-M (weights)
pymupdf4llm (PyMuPDF’s markdown wrapper) 0.802 0.612 0.905 AGPL-3.0
Unstructured (open) 0.788 0.701 0.864 Apache-2.0

Note that raw PyMuPDF has no standalone benchmark entry — pymupdf4llm, the markdown wrapper most teams actually compare against pdfmux, is the closest comparable measurement. See best PDF extraction library for Python for the full 8-engine ranking including the paid tier.

Comparison Table

Tool License Tables Speed Install Size LLM Output
pdfmux MIT Excellent (0.911) Fast ~20 MB base Native
pdfplumber MIT Good (bordered only) Medium ~25 MB Manual
Marker Apache-2.0 + Open RAIL-M Good (0.808) Slow (CPU) 2+ GB Native
Docling MIT Best single-engine (0.887) Medium ~500 MB Native
pypdf BSD None Fast ~5 MB Manual
Unstructured Apache-2.0 Fair (0.701) Slow 1 GB+ Manual

Which one should you actually pick?

You’re building a RAG or LLM ingestion pipeline: pick pdfmux. It’s the only tool here that pairs a competitive benchmark score with native structured output and a confidence score per page, so you can route low-confidence pages to human review instead of silently indexing bad extractions.

You need pixel-level control for data journalism or forensic extraction: pick pdfplumber. No other tool on this list gives you per-character bounding boxes and a visual debugger.

Your corpus is mostly scanned academic PDFs with equations, and you have GPU access: pick Marker, but get your compliance team to read the Open RAIL-M weights license first if you’re above the revenue threshold.

Table accuracy is the only thing that matters and latency is not a concern: pick Docling. It’s the highest single-engine table score measured, at the cost of a 500 MB install and a 30-60s cold start on every fresh process.

You just need merge/split/rotate and basic text, nothing fancy: pick pypdf. It’s the lightest footprint here and the only one with real PDF-manipulation support.

FAQ

What’s the best MIT-licensed PyMuPDF alternative?

pdfmux is the best MIT-licensed alternative for LLM/RAG use cases — it scores 0.903 overall on opendataloader-bench, ahead of PyMuPDF’s own pymupdf4llm wrapper (0.802), while producing structured Markdown and JSON instead of raw text. Docling (also MIT) is the better pick if table accuracy specifically is your top priority and you don’t mind the 500 MB install.

Can I use PyMuPDF commercially without open-sourcing my code?

Only with a commercial license from Artifex. The AGPL-3.0 license requires you to release your source code if you distribute software that links against PyMuPDF. Tools like pdfmux (MIT) and pdfplumber (MIT) have no such requirement.

Which alternative is best for RAG pipelines?

pdfmux is purpose-built for RAG workflows with native markdown output, structured JSON, and a per-page confidence score you can use to gate what gets indexed. See PDF extraction for RAG pipelines for the full ingestion architecture.

Is Marker’s license actually a problem for commercial use?

Only above a revenue/funding threshold. Marker’s code is Apache 2.0 — no restriction there. The model weights it downloads at runtime carry a separate Open RAIL-M license that’s free for research, personal projects, and companies under roughly $5M in funding or revenue. Above that, you need to read the weights license directly; it isn’t a blanket block the way AGPL is for PyMuPDF.

Do any of these alternatives require a GPU?

Marker benefits significantly from one — CPU inference is 1-10s/page versus 0.3-1s on GPU. Docling can use a GPU but runs acceptably on CPU. pdfmux, pdfplumber, pypdf, and Unstructured’s base path are all CPU-only by design.


For a head-to-head comparison, see pdfmux vs PyMuPDF and PyMuPDF vs Marker. For the full 8-engine ranking including paid options, read Best PDF Extraction Library for Python.