Skip to content
@pymupdf

PyMuPDF

This represents the central repository, PyMuPDF and related repositories

PyMuPDF logo

PyMuPDF

Layout-aware document engine for AI and a feature-rich Python toolkit for extracting, rendering and editing PDFs and other documents. Since version 2.0, its ML-based layout analysis turns PDFs and Office files into high-quality Markdown for RAG and agents, running fast on CPU and grounding every result to its source page.

PyMuPDF on PyPI pymupdf4llm on PyPI Documentation Discord Forum Hugging Face License


What we build

PyMuPDF is a layout-aware document engine for AI and a feature-rich Python toolkit for extracting, rendering and editing PDFs and other documents. Since version 2.0, its ML-based layout analysis turns PDFs and Office files into high-quality Markdown for RAG and agents, running fast on CPU and grounding every result to its source page.


Repositories

PyMuPDF — core library

Stars PyPI

The foundation of everything here. PyMuPDF wraps the MuPDF C engine and exposes a full Python API for reading, rendering, editing, and converting PDF, XPS, EPUB, MOBI, CBZ, Markdown and image files.

pip install pymupdf
import pymupdf

doc = pymupdf.open("report.pdf")
page = doc[0]
print(page.get_text())           # extract text
print(doc.to_markdown())         # extract document as markdown
pix = page.get_pixmap(dpi=150)   # render to image
pix.save("page.png")

Key capabilities: Markdown input and output · text and image extraction · page rendering at any DPI · annotation create/edit/delete · redaction · PDF creation and merging · encryption · OCR via Rapid OCR and/or Tesseract · form fields · 10+ output formats

→ Documentation · PyPI · Changelog


pymupdf4llm — PDF → LLM-ready data

Stars PyPI

Turn any document into clean, structured data for RAG pipelines, vector stores, and LLM ingestion — in one line. No GPU, no cloud, no tokens required.

Now part of PyMuPDF >= 2.0

Key capabilities: layout-aware extraction · multi-column reading order · table detection → Markdown · smart hybrid OCR (only where needed) · page chunking with metadata · LlamaIndex and LangChain integrations · 10–250× cheaper than vision-LLM approaches

→ Documentation · PyPI · Live demo


langchain-pymupdf4llm — LangChain integration

PyPI

A drop-in LangChain document loader and parser backed by pymupdf4llm. Extracts PDF content as Markdown and feeds it directly into any LangChain retrieval chain.

pip install langchain-pymupdf4llm
from langchain_pymupdf4llm import PyMuPDF4LLMLoader

loader = PyMuPDF4LLMLoader("document.pdf", mode="single")
docs = loader.load()

→ PyPI


pymupdf4llm-mcp — MCP server

PyPI

An MCP (Model Context Protocol) server exposing pymupdf4llm as a tool. Gives any MCP-compatible AI client (Claude, Cursor, Windsurf) direct access to PDF-to-Markdown extraction.

uvx pymupdf4llm-mcp@latest stdio

→ PyPI


PyMuPDF-Utilities — demos & examples

Stars

A collection of working example scripts, Jupyter notebooks, and GUI demos built on PyMuPDF. Covers image handling, annotation workflows, data extraction patterns, and more — useful as a recipe book alongside the official documentation.

→ Browse examples


pymupdf-fonts — optional font collection

An optional font package extending the fonts available for text output in PyMuPDF. Includes additional Unicode-compatible typefaces beyond the 14 standard PDF fonts.

pip install pymupdf-fonts

Documentation & community

Resource Link
Full documentation pymupdf.readthedocs.io
pymupdf4llm docs pymupdf.readthedocs.io/en/latest/pymupdf4llm
Extraction demo huggingface.co/spaces/artifex-software/pymupdfextraction
Discord pymupdf.io/discord/artifex
Forum forum.mupdf.com
PyPI · PyMuPDF pypi.org/project/pymupdf
PyPI · pymupdf4llm pypi.org/project/pymupdf4llm
Bug reports & issues github.com/pymupdf/PyMuPDF/issues

License

All repositories in this organisation are available under the GNU AGPL v3 for open-source use, and under a commercial licence for proprietary applications. Commercial licences are available from Artifex Software — the creators and maintainers of MuPDF, PyMuPDF, and this organisation.


Maintained by Artifex Software, Inc. · pymupdf.io

Pinned Loading

  1. PyMuPDF PyMuPDF Public

    Layout-aware document engine for AI and a feature-rich Python toolkit for extracting, rendering and editing PDFs and other documents. Since version 2.0, its ML-based layout analysis turns PDFs and …

    Python 11.2k 846

  2. PyMuPDF-Utilities PyMuPDF-Utilities Public

    Demos, examples and utilities using PyMuPDF

    Jupyter Notebook 722 180

  3. pymupdf4llm pymupdf4llm Public

    PyMuPDF4LLM

    Python 2.3k 260

  4. pymupdf4llm-mcp pymupdf4llm-mcp Public

    Python 73 13

  5. pymupdf-fonts pymupdf-fonts Public

    Collection of optional fonts for PyMuPDF

    Python 14 3

  6. cookbook cookbook Public

    The PyMuPDF Cookbook

    Jupyter Notebook 1

Repositories

Showing 10 of 18 repositories
  • pymupdf4llm Public

    PyMuPDF4LLM

    pymupdf/pymupdf4llm's past year of commit activity
    Python 2,300 AGPL-3.0 260 31 31 Updated Nov 19, 2026
  • PyMuPDF Public

    Layout-aware document engine for AI and a feature-rich Python toolkit for extracting, rendering and editing PDFs and other documents. Since version 2.0, its ML-based layout analysis turns PDFs and Office files into high-quality Markdown for RAG and agents, running fast on CPU and grounding every result to its source page.

    pymupdf/PyMuPDF's past year of commit activity
    Python 11,173 AGPL-3.0 846 62 21 Updated Nov 19, 2026
  • cookbook Public

    The PyMuPDF Cookbook

    pymupdf/cookbook's past year of commit activity
    Jupyter Notebook 1 0 1 1 Updated Nov 19, 2026
  • .github Public
    pymupdf/.github's past year of commit activity
    0 0 0 0 Updated Nov 18, 2026
  • ParseBench-Version-Lab Public

    ParseBench version-testing lab with PyMuPDF GitHub Actions automation

    pymupdf/ParseBench-Version-Lab's past year of commit activity
    Python 0 Apache-2.0 0 0 1 Updated Nov 18, 2026
  • ParseBench Public Forked from run-llama/ParseBench

    PyMuPDF's benchmark-operations fork of run-llama/ParseBench. We run the unmodified suite on a pinned cloud runner and publish the result JSON behind the pymupdf.io benchmark section (see the benchmark-page branch, benchpage/README). For the benchmark suite itself, use upstream run-llama/ParseBench.

    pymupdf/ParseBench's past year of commit activity
    Python 1 Apache-2.0 160 0 0 Updated Nov 9, 2026
  • PyMuPDF-Layout-Demos Public

    Benchmarking and demos for PyMuPDF Layout

    pymupdf/PyMuPDF-Layout-Demos's past year of commit activity
    Python 7 MIT 1 1 1 Updated Sep 11, 2026
  • pymupdf/pymupdf4llm-modern-rapidocr-demo's past year of commit activity
    Python 0 0 0 0 Updated Jul 7, 2026
  • pymupdf/pymupdf4llm-mcp's past year of commit activity
    Python 73 AGPL-3.0 13 1 5 Updated Jul 2, 2026
  • langchain-pymupdf4llm Public

    An integration package connecting PyMuPDF4LLM to LangChain

    pymupdf/langchain-pymupdf4llm's past year of commit activity
    Python 24 AGPL-3.0 5 2 1 Updated Jul 1, 2026

People

This organization has no public members. You must be a member to see who’s a part of this organization.