PyMuPDF Python document-processing library built on MuPDF for rendering, extraction and PDF manipulation.
Overview PyMuPDF is a Python library built on MuPDF for extracting, analyzing, rendering and manipulating documents. Its PDF functions include page operations, annotations and text handling. The standard library is distinct from the optional PyMuPDF Pro and PyMuPDF4LLM products.[1]
Contents Scanned content OCR is an optional Tesseract-based workflow rather than a universal property of ordinary text extraction. Recognized text can be stored in a hidden layer or a reusable TextPage for later searches. The documented image workflow does not reconstruct original bold, italic or font identity, and Tesseract does not recognize vector drawings as such. A searchable result should therefore not be confused with recovering an editable original document.[3]
Concurrency and packaging The library does not support multithreaded use; its guide instead demonstrates separate processes for page-oriented work. A Document object cannot simply be passed as a pickled task argument, so each process opens its own document. Installation normally uses a compatible wheel, with source compilation requiring native development tools when one is unavailable. The legacy import name fitz can also collide with an unrelated package of that name.[4] [5]
Licensing and substitution PyMuPDF is available through AGPL or commercial licensing. It can substitute for selected pypdf page-manipulation and text-extraction tasks, with rendering available in the same library. This requires adapting application code and accepting a native-library deployment model rather than a pure-Python implementation. Platform-wheel availability and the chosen license remain practical selection criteria, independently of whether both libraries can process a particular PDF.[1] [5] [6]
References PyMuPDF features and licensing MuPDF basis, product boundaries, Office caveats and licensing
vendor · retrieved 2026-10-07 Opening documents File recognition, formats and remote byte streams
vendor · retrieved 2026-10-07 Integrated OCR Separate Tesseract dependency, hidden text and reusable TextPage
vendor · retrieved 2026-10-07 Multiprocessing guidance Unsupported multithreading and process-based handling
vendor · retrieved 2026-10-07 Installation Wheels, native compilation, legacy fitz package collision and platform limits
vendor · retrieved 2026-10-07 pypdf overview Python page manipulation and text extraction
vendor · retrieved 2026-10-07 Also included: 4 capabilities and 0 substitute relationships. Check substitutes in section 1 and capabilities in section 3.