# PyMuPDF

> A high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.

Source: https://talira.ai/catalog/pymupdf-xw9pb5xf
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [documents / pdf / manipulation](https://talira.ai/categories/documents/pdf/manipulation), [documents / pdf / extraction](https://talira.ai/categories/documents/pdf/extraction), [languages / python](https://talira.ai/categories/languages/python), [ai / rag / ingestion](https://talira.ai/categories/ai/rag/ingestion)
- Platforms: linux, macos, windows[^3][^8]
- Licence: AGPL-3.0-only[^7][^8]
- Pricing: Free and open source[^3][^5][^6]
- Pricing notes: Free under AGPL-3.0. Commercial licences from Artifex for proprietary use; prices not published (contact Artifex). PyMuPDF Office (layout-faithful Office formats) needs a licence key.
- Free tier: yes[^3][^5][^6]
- Self-hostable: yes[^3]
- Backed by: [Artifex Software](https://talira.ai/orgs/artifex-software.md)

PyMuPDF is the Python binding to [MuPDF](https://talira.ai/catalog/mupdf-a0hpyn67.md), Artifex's C PDF and document engine. It renders pages to images, extracts text, words, tables, images and vector graphics with coordinates, edits and annotates PDFs, fills and creates form fields, redacts, merges and splits, and opens XPS, EPUB, MOBI, CBZ, SVG and images too. Since PyMuPDF 2.0 it also holds what was pymupdf4llm: machine-learning layout analysis on CPU turns PDFs and Office files into Markdown, JSON or text for RAG and agents, with OCR through RapidOCR or [Tesseract](https://talira.ai/catalog/tesseract-n5wxbj3p.md). It is very fast compared with pure-Python libraries. It is dual-licensed: GNU AGPL-3.0 for open-source use, or a paid commercial licence from Artifex for proprietary or closed-source products (including SaaS that can't meet the AGPL).

## Links

- Website: https://pymupdf.io/
- GitHub: https://github.com/pymupdf/PyMuPDF
- Docs: https://pymupdf.readthedocs.io/
- Pricing: https://artifex.com/licensing

## Problems it solves

- pypdf takes minutes to pull the text out of a few thousand pages
- render PDF pages to PNG thumbnails in Python without shelling out to another program
- get every word on the page with its x/y coordinates so I can find where a label is
- black out sensitive text in a PDF for real, not just draw a box over it
- add highlights, notes and stamps to a PDF from a Python script
- fill in and read the values of form fields in a PDF using Python
- extract the embedded images from a PDF at their original resolution
- convert PDFs to Markdown for an LLM without paying for a cloud API
- open EPUB and XPS files with the same code I use for PDFs
- one Python library that can read, edit, render and write PDFs instead of four
- insert text and draw shapes onto an existing PDF page
- OCR only the scanned pages while turning PDFs into Markdown for RAG
- Markdown with headings and tables from PDFs for a LlamaIndex pipeline

## Features

- render pages of all supported formats to images
- extract text, Markdown, tables and vector graphics
- write text and draw vector graphics on PDF pages
- handles damaged and encrypted PDFs and incremental updates
- annotations and form field creation, reading and updating
- redaction, optional content, font subsetting
- Tesseract OCR API
- merge PDFs with other document types
- opens PDF, XPS, EPUB, MOBI, FB2, CBZ, SVG, TXT, MD and images; DOCX/XLSX/PPTX/HWPX via HTML conversion

## Limitations

- Can't digitally sign PDFs or create signature fields[^1]
- Not thread-safe: use multiple processes instead of threads[^2][^3]

## Ways to run it

### PyMuPDF (AGPL)

You run it, AGPL-3.0-only. Price: free.[^3]

Only in this edition:

- PDF processing library
- runs without a GPU

Not included:

- Office formats (PyMuPDF Office)[^3][^4]
- support (community only)[^5]
- use in proprietary software or networked services without sharing source[^5]

You arrange:

- share your source under the AGPL, including for networked deployments
- keep the producer notice in generated PDFs

Self-hosting docs: https://pymupdf.io/licensing

### PyMuPDF commercial licence (Artifex)

You run it, under a commercial licence. Price: no published prices; contact Artifex sales (OEM distribution or subscription, per-copy cost with a quarterly minimum fee).[^5][^6]

Only in this edition:

- release from AGPL obligations (proprietary, SaaS, OEM, internal use)
- direct engineering support
- redistribution rights for embedded products

You arrange:

- annual distribution-volume reporting for OEM distribution

Self-hosting docs: https://artifex.com/licensing

### PyMuPDF Office

You run it, under a commercial licence. Price: no published price; free trial key for a limited time.[^4]

Only in this edition:

- Word, Excel, PowerPoint and HWP/HWPX to PDF, Markdown or JSON

You arrange:

- a licence key passed to pymupdf.office.unlock()

Self-hosting docs: https://pymupdf.io/office

## Capabilities

- Has official SDKs: plan not known

## Trust

Overall: 0.69 out of 1.
Signals: maintenance 1.00, adoption 0.81, momentum 0.55, community 0.81, backing 0.30, extensibility 0.00.

- last commit 10 days ago
- 228 commits in the last 90 days
- latest release 2.1 21 days ago
- 11.1k GitHub stars
- 107 contributors
- backed by Artifex Software

## Alternatives

- [pypdfium2](https://talira.ai/catalog/pypdfium2-2qb89jmf.md): Python bindings to PDFium, reasonably cross-platform
- [Apache PDFBox](https://talira.ai/catalog/apache-pdfbox-79k8kxaj.md): The Apache PDFBox library is an open source Java tool for working with PDF documents.
- [MuPDF](https://talira.ai/catalog/mupdf-a0hpyn67.md): The ultimate library for managing PDF documents
- [pdfplumber](https://talira.ai/catalog/pdfplumber-phcpd0sv.md): Plumb a PDF for detailed information about each char, rectangle, line, et cetera — and easily extract text and tables.
- [pdf-lib](https://talira.ai/catalog/pdf-lib-80dtat8x.md): Create and modify PDF documents in any JavaScript environment.
- [Apryse SDK (WebViewer)](https://talira.ai/catalog/apryse-sdk-webviewer-69z3ztef.md): Document SDKs for viewing, editing and extracting data across 100+ formats

## Sources

[^1]: https://pymupdf.readthedocs.io/en/latest/widget.html (checked 17 Nov 2026)
[^2]: https://pymupdf.readthedocs.io/en/latest/recipes-multiprocessing.html (checked 17 Nov 2026)
[^3]: https://github.com/pymupdf/PyMuPDF (checked 17 Nov 2026)
[^4]: https://pymupdf.readthedocs.io/en/latest/pymupdf-office/index.html (checked 17 Nov 2026)
[^5]: https://pymupdf.io/licensing (checked 17 Nov 2026)
[^6]: https://artifex.com/licensing (checked 17 Nov 2026)
[^7]: https://github.com/pymupdf/PyMuPDF/blob/main/COPYING (checked 17 Nov 2026)
[^8]: https://pypi.org/project/PyMuPDF/ (checked 17 Nov 2026)
