pymupdf4llm
PyMuPDF Utilities for LLM/RAG
Install
pymupdf4llm on PyPI
pip
pip install pymupdf4llmuv
uv add pymupdf4llmpoetry
poetry add pymupdf4llmPackage facts
| License | Dual Licensed - GNU AFFERO GPL 3.0 or Artifex Commercial License (agpl) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — pymupdf, pymupdf_layout, tabulate, psutil |
| Maintenance | actively maintained — 7 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: pymupdf4llm-1.28.2-py3-none-any.whl
About pymupdf4llm
from the package's own PyPI description — quoted content, verbatim
<p align="center"> <a href="https://pymupdf.io?utm_source=github&utm_medium=referral&utm_campaign=pymupdf4llm_github&utm_content=logo&utm_term=website"> <img loading="lazy" alt="PyMuPDF" src="https://pymupdf.pro/images/py-mupdf4llm-github-icon.png" width="96px" alt="PyMuPDF logo"/> </a> </p>
PyMuPDF4LLM
<p align="center"> <a href="https://trendshift.io/repositories/11536" target="_blank"><img src="https://trendshift.io/api/badge/repositories/11536" alt="pymupdf%2FPyMuPDF | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a> </p>
Docs (image) PyPI Version (image) PyPI - Python Version (image) License AGPL (image) [![PyPI...
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Converts PDFs and documents into structured Markdown, JSON, and plain text optimized for LLM ingestion and RAG pipelines, with automatic layout analysis, table detection, and selective OCR.
Low friction: pure-Python wheel with four straightforward runtime dependencies (pymupdf, pymupdf_layout, tabulate, psutil). Active maintenance—released 7 days ago with strong community engagement.
Dual-licensed under AGPL 3.0 or Artifex Commercial License. AGPL applies to open-source use; commercial projects require either compliance with AGPL's copyleft terms or a separate commercial license from Artifex.
Usage
pip install pymupdf4llm
import pymupdf4llm
md = pymupdf4llm.to_markdown("document.pdf")
print(md)
Requires Python ≥3.10.
Verdict: Production-ready tool for document-to-LLM pipelines with no GPU or cloud dependency. Active maintenance, low install friction, and zero known vulnerabilities make it reliable for RAG workflows. AGPL licensing requires attention: open-source projects are compatible, but commercial deployments need explicit licensing review or a commercial license purchase.
Needs verification
- Whether pymupdf_layout has compiled dependencies that might affect portability across platforms
- Performance characteristics and memory footprint on large documents or batch processing
- Scope and completeness of OCR coverage for non-Latin scripts and handwritten text
Similar packages
agpl · top 1,000 on PyPI
pymupdf-layoutagpl · top 1,000 on PyPI
questionarypermissive · top 1,000 on PyPI
markdownifypermissive · top 1,000 on PyPI
llama-parsepermissive · top 1,000 on PyPI
pdfplumberpermissive · top 1,000 on PyPI
llama-index-indices-managed-llama-cloudpermissive · top 1,000 on PyPI
fastmcppermissive · top 1,000 on PyPI
pytesseractpermissive · top 1,000 on PyPI
pdfminer.sixpermissive · top 1,000 on PyPI