pymupdf4llm turns PDFs into Markdown for RAG and LLM pipelines, built on top of PyMuPDF. PDFluent's structured-extraction API covers PDF plus DOCX, PPTX, XLSX, and HTML from one Rust core — currently shipping as a preview.
pymupdf4llm is PyMuPDF's official Markdown-extraction layer, purpose-built for RAG and LLM ingestion pipelines, and it only reads PDF. PDFluent's structured-extraction API (extract_markdown / extract_blocks) ships as a preview in 1.1.0 — not yet marked stable — and also covers DOCX, PPTX, XLSX, and HTML from the same Rust core as the rest of the SDK.
use pdfluent::{ExtractOptions, PdfDocument};
fn main() -> pdfluent::Result<()> {
let doc = PdfDocument::open("report.pdf")?;
// Structured extraction (Preview)
let markdown = doc.extract_markdown(&ExtractOptions::default())?;
println!("{}", markdown);
Ok(())
}import pymupdf4llm
markdown = pymupdf4llm.to_markdown("report.pdf")
print(markdown)| Feature | PDFluent | pymupdf4llm |
|---|---|---|
| Primary purpose | General PDF/Office SDK + preview structured extraction | Markdown extraction layer for PyMuPDF |
| Structured extraction status | Preview (1.1.0) — not yet stable | Established, widely used in RAG pipelines |
| PDF to Markdown | Preview | |
| DOCX to Markdown | Preview — at least as good as Docling on text, words, headings, heading levels, list levels, tables, TEDS, and coverage (A31, measured 2026-10-04) | Not supported — PDF input only |
| PPTX to Markdown | Preview — at least as good as Docling on text, words, headings, heading levels, lists, and reading order; not tables/TEDS (A32, measured 2026-10-04) | Not supported — PDF input only |
| XLSX to Markdown | Preview — at least as good as Docling on headings, tables, and TEDS; not words (A33, measured 2026-10-04) | Not supported — PDF input only |
| HTML to Markdown | Preview — lists and tables at least as good as Docling; not text/coverage (A34, measured 2026-10-04) | Not supported — PDF input only |
| PDF structure quality (headings, tables) | Standard tier behind Docling-class tools as of our latest internal benchmark (ID pending) | Reference point for that same internal benchmark |
| Peak memory on structured extraction | 17 MB peak RSS, 8 MB install (C15, measured 2026-09-26) | Measured in the same run, within a 46–4,454 MB field of six tools (C15, measured 2026-09-26) |
| Throughput on structured extraction | 11.6 ms/page single-thread, 1.8 ms/page at 8 threads (C16, measured 2026-09-27) | 222 ms/page in its own batch (C16, measured 2026-09-27) |
| License model | AGPL v3 or commercial | AGPL v3 or commercial (via Artifex, same as PyMuPDF) |
| Language bindings | Rust, Python, Node.js, .NET, Java, WASM | Python only |
Choose PDFluent's structured extraction if you need Markdown output across PDF and Office formats from one engine, or if footprint and throughput matter more than using an established, stable tool today — keeping in mind it ships as a preview in 1.1.0.
Choose pymupdf4llm if you need a stable, battle-tested Markdown layer for PDF-only RAG pipelines right now and don't need Office-format input.
pymupdf4llm is the established choice today if you need stable, production-ready Markdown extraction from PDF for a RAG pipeline — it's been in use longer and is marked stable. PDFluent's extract_markdown and extract_blocks ship as a preview in 1.1.0: not yet stable, but already measured well ahead on footprint and throughput against pymupdf4llm and four other tools on the same benchmark (C15, measured 2026-09-26; C16, measured 2026-09-27), and already covering DOCX, PPTX, XLSX, and HTML in addition to PDF — formats pymupdf4llm doesn't touch. On raw PDF structure quality (headings and table recognition), PDFluent's standard tier is still behind Docling-class tools as of our latest internal measurement; that gap is open work, not a shipped claim.
Try PDFluent free for 30 days
No credit card. No watermarks. Full SDK access.
PyMuPDF and MuPDF are trademarks of Artifex Software, Inc. PDFluent is an independent product of Innovation Trigger B.V. and is not affiliated with or endorsed by Artifex.