# PDF4LLM > PDF4LLM is the pre-LLM document processing layer for RAG pipelines and AI applications. Built by Artifex on the MuPDF engine, it extracts clean Markdown, structured layout, tables, and reading order from PDFs — CPU-only, ~10× faster than Vision Language Model approaches, at roughly 1/240th the cost per 1,000 pages. Available as PyMuPDF4LLM (Python), PDF4LLM (.NET), and PDF4LLM (JS, coming soon). PDF4LLM solves the structural problems that break RAG pipelines: scrambled multi-column reading order, dropped tables, lost document hierarchy, and image-vs-text confusion. It uses Graph Neural Networks trained on PDF internals (fonts, glyph positions, draw commands) rather than rasterizing pages and running a vision model — delivering vision-model accuracy on CPU with no GPU dependency. Key facts: - Throughput: ~0.17s per page on CPU vs. ~35s/page for VLM-based parsers. - Cost: ~$0.06 per 1,000 pages on Google Cloud Compute vs. ~$14.40 per 1,000 pages at vision token rates. - Powered by the MuPDF C core, with 20+ years of PDF engineering heritage. - Open source on PyPI and NuGet; commercial licensing for proprietary use. ## Products - [PyMuPDF4LLM (Python)](https://pypi.org/project/pymupdf4llm/): The original — `pip install pymupdf4llm`. PDF-to-Markdown with layout, page chunking, table extraction, and per-page image extraction. Built for Python's AI/ML ecosystem. - [PDF4LLM (.NET)](https://www.nuget.org/packages/PDF4LLM/): Enterprise-grade PDF intelligence for .NET 8+. `dotnet add package PDF4LLM`. Same MuPDF engine as the Python version, plus built-in barcode parsing. - [PDF4LLM (JS)](https://www.pdf4llm.com/#products): WASM-powered PDF-to-Markdown for Node.js and browser environments. Currently in waitlist; serverless-first architecture. - [MuPDF WebViewer](https://webviewer.mupdf.com/): Companion document viewer that shares the MuPDF C core with PDF4LLM, enabling AI citation — when an LLM returns an answer, the source passage can be highlighted in the viewer at exact coordinates. ## Documentation - [Docs home](https://docs.pdf4llm.com/): Installation, quickstart, guides, and API reference for both Python and .NET. - [Python — Installation](https://docs.pdf4llm.com/python/getting-started/installation) - [Python — Quickstart](https://docs.pdf4llm.com/python/getting-started/quickstart) - [Python — Supported Formats](https://docs.pdf4llm.com/python/getting-started/supported-formats) - [Python — FAQ](https://docs.pdf4llm.com/python/getting-started/faq) - [Python — Extract Markdown](https://docs.pdf4llm.com/python/guides/extract-Markdown) - [Python — Extract JSON](https://docs.pdf4llm.com/python/guides/extract-JSON) - [Python — Extract Text](https://docs.pdf4llm.com/python/guides/extract-Text) - [Python — Images & Graphics](https://docs.pdf4llm.com/python/guides/images-and-graphics) - [Python — Tables](https://docs.pdf4llm.com/python/guides/tables) - [Python — Page Selection](https://docs.pdf4llm.com/python/guides/page-selection) - [Python — Saving Output](https://docs.pdf4llm.com/python/guides/saving-output) - [Python — OCR](https://docs.pdf4llm.com/python/guides/OCR) - [Python — OCR Plugins](https://docs.pdf4llm.com/python/guides/OCR/plugins) - [Python — Tesseract Language Packs](https://docs.pdf4llm.com/python/guides/OCR/tesseract-language-packs) - [Python — API Reference](https://docs.pdf4llm.com/python/api) - [Python — Chunk Schema](https://docs.pdf4llm.com/python/reference/chunk-schema) - [Python — JSON Schema](https://docs.pdf4llm.com/python/reference/JSON-schema) - [Python — Changelog](https://docs.pdf4llm.com/python/reference/changelog) - [.NET — Installation](https://docs.pdf4llm.com/dotnet/getting-started/installation) - [.NET — Quickstart](https://docs.pdf4llm.com/dotnet/getting-started/quickstart) ## Integrations - [LangChain integration](https://docs.pdf4llm.com/python/integrations/LangChain): Native `PyMuPDFLoader` for LangChain document loaders. - [PyMuPDF Pro integration](https://docs.pdf4llm.com/python/integrations/PyMuPDF-Pro): Extends PDF4LLM with Microsoft Office (DOCX, PPTX, XLSX) and Hangul (HWPX) input. - [LlamaIndex](https://docs.pdf4llm.com/): Direct support for output as LlamaIndex Documents. ## Distribution - [PyPI: pymupdf4llm](https://pypi.org/project/pymupdf4llm/) - [NuGet: PDF4LLM](https://www.nuget.org/packages/PDF4LLM/) - [GitHub](https://docs.pdf4llm.com/github) - [Live demo](https://demo.pymupdf.io) ## Licensing and contact - [Commercial licensing](https://artifex.com/licensing): Required for proprietary use; AGPL otherwise. - [Contact](https://artifex.com/contact/): Sales and support inquiries. - [Privacy Policy](https://www.pdf4llm.com/privacy-policy) ## Social - [Discord](https://pymupdf.io/discord/pdf4llm): Community Discord for PDF4LLM users. - [Forum](https://forum.mupdf.com): MuPDF and PyMuPDF community forum. - [Parent company: Artifex](https://artifex.com): The company behind PDF4LLM, MuPDF, and Ghostscript. - [PyMuPDF (general-purpose)](https://pymupdf.io/): The broader PyMuPDF library that PyMuPDF4LLM builds on.