# PyMuPDF

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

Repository: https://github.com/pymupdf/PyMuPDF
Canonical: https://ross.abutalabs.com/products/pymupdf
Homepage: https://pymupdf.readthedocs.io/?utm_source=github&utm_medium=referral&utm_campaign=pymupdf_github&utm_content=about&utm_term=docs
Language: Python
License: AGPL-3.0
License Family: copyleft
Topics: mupdf, xps, pdf-documents, epub, ocr, pdf, font, python, data-science, extract-data, table-extraction, pymupdf, tesseract, text-processing, text-shaping
Last push: 2026-08-26T11:53:06+00:00
Link (homepage): https://pymupdf.readthedocs.io/?utm_source=github&utm_medium=referral&utm_campaign=pymupdf_github&utm_content=about&utm_term=docs

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 96, longevity 100
- inputs: {"age_days": 5079, "days_push": 7, "days_rel": 27, "gap_med": 26.0, "n_releases_24m": 23}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 10578, forks 787 (observed 2026-08-28T04:10:42.419654+00:00)

## What it is
PyMuPDF is a high-performance Python library built on the MuPDF C engine for extracting, analyzing, converting, rendering, and manipulating PDF and other document formats. Its companion package pymupdf4llm provides utilities for converting documents into LLM/RAG-friendly output like Markdown.

## Use cases
- extract text from pdf files in python
- convert pdfs to markdown for llm and rag pipelines
- extract tables from pdf documents
- perform ocr on scanned pdfs with tesseract
- render pdf pages to images
- manipulate and annotate pdf documents programmatically

## When to choose
- you need fast, dependency-light PDF text and image extraction in Python
- you are building document ingestion pipelines for LLMs or RAG systems
- you need table extraction, OCR, or page rendering from PDFs
- you need low-level control over PDF structure alongside high-level APIs

## When to avoid
- your project cannot accept AGPL-3.0 licensing and you cannot buy a commercial license
- you only need to create simple PDFs from scratch rather than process existing documents
- you need a pure-Python solution without a compiled C engine

## Facets
- artifact type: library
- maturity: stable
- function: pdf, ocr, parser, image-processing, nlp
- domain: pdf, files, data-science, developer-tools
- platform: python, cross-platform
- tags: mupdf, text-extraction, table-extraction, llm-rag, document-conversion, epub, xps, natural-language-processing

## Member repositories
- pymupdf/PyMuPDF (main) score 98
- pymupdf/pymupdf4llm (plugin) score 82

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:42.419654+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:18:30.920130+00:00, confidence not recorded.
  - readme: https://github.com/pymupdf/PyMuPDF (fetched 2026-08-28T04:10:42.419654+00:00, sha e70b6bf8ae7d)
  - homepage: https://pymupdf.readthedocs.io/?utm_source=github&utm_medium=referral&utm_campaign=pymupdf_github&utm_content=about&utm_term=docs (fetched 2026-08-29T08:17:41.851008+00:00, sha 69176eac0714)
  - registry_pypi: https://pypi.org/pypi/pymupdf4llm/json (fetched 2026-08-29T08:17:41.860261+00:00, sha af6627c88bad)
- Data as of 2026-08-30T08:39:29.467469+00:00.
