PyMuPDF: Python library for PDF document processing
Python bindings for MuPDF document processing library.
Learn more about PyMuPDF
import fitz\ndoc = fitz.open("document.pdf")\nprint(doc.page_count)
MuPDF-based architecture
Built as Python bindings to MuPDF, a lightweight C toolkit maintained by Artifex Software. This approach provides direct access to a mature rendering engine without reimplementing PDF parsing logic in Python.
Multi-format support
Handles PDF, XPS, EPUB, and other document formats through a single API. The underlying MuPDF engine provides native support for these formats rather than relying on format-specific libraries.
Optional feature extensibility
Core functionality requires no external dependencies, while optional features like font subsetting (fontTools) and OCR (Tesseract) can be added independently. This allows users to install only the capabilities they need.
import pymupdf
doc = pymupdf.open("report.pdf")
page = doc[0]
text = page.get_text()
print(text)
doc.close()PyMuPDF 1.26.7 updates to MuPDF-1.26.12 and improves security of the embed-extract command.
- –Use MuPDF-1.26.12.
- –Retrospectively mark #4756 as fixed in 1.26.6.
- –Improved safety of pymupdf embed-extract. This now refuses to write to unsafe locations.
PyMuPDF 1.26.6 updates to MuPDF-1.26.11, adds Python 3.14 support, drops Python 3.9, and fixes several reported issues.
- –Use MuPDF-1.26.11.
- –Supported Python versions are now 3.10-3.14.
- –Fixed #4699, #4712
PyMuPDF 1.26.5 updates to MuPDF-1.26.10, expands Python support to 3.9-3.14, and includes multiple bug fixes and code improvements.
- –Use MuPDF-1.26.10.
- –Fixed #2883, #4507, #4613
Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
Create T3 App
Interactive CLI for scaffolding typesafe Next.js applications with the T3 Stack technology combination.
ZXing
Multi-format 1D/2D barcode decoder in Java.
Git
Snapshot-based version control with distributed repository architecture.
open-directory
Command-line search engine for indexed open directories.
Oh My Zsh
Community-driven zsh configuration framework with modular plugins.
Related Reading
Guides and comparisons from the Greptile content library
10 Powerful Code Quality Tools That Catch Bugs Before Deployment
We tested 10 code quality tools that catch bugs before production. Detailed comparison with real-world examples, pricing, and ROI analysis for dev teams.
Best AI Code Review Tools for GitHub
Top-rated AI code review tools for GitHub teams in 2025. Compare features, pricing, and accuracy to find the perfect fit for faster PR reviews and bulletproof code quality.
Greptile Ranks #1 on Martian's AI Code Review Benchmark
Greptile ranks #1 on Martian's independent online AI code review benchmark, leading all evaluated tools in F1 score and precision with near-leading recall.
AI Coding Tools: A 2026 Guide to Every Category
A 2026 guide to every category of AI coding tool: assistants, editors, code generators, code review, and testing tools.