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.
RedisInsight
Cross-platform desktop client for Redis data management and monitoring.
ts-node
Execute TypeScript directly without precompilation step.
Axios
Promise-based HTTP client with unified browser and Node.js interface.
n
A command-line utility for installing, switching between, and managing multiple Node.js versions on Unix-like systems.