Already compared with PyMuPDF. Its fit as a replacement still needs assessment.
How PyMuPDF compares as a replacement
Extract document content, render pages and manipulate PDFs in Python limited
PyMuPDF → pypdf
Can replace selected PDF page and text-processing tasks when native MuPDF components and different licensing fit; existing pypdf APIs require adaptation.
Render PDF pages and inspect text or page objects from Python limited
pypdfium2 → PyMuPDF
Can replace PDF rendering and selected inspection tasks when PDFium's API and build fit; it is not equivalent to PyMuPDF's broader document-format or optional product support.
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]
Opening and recognizing documents
PyMuPDF accepts several document and image types in addition to PDF. It examines file content rather than relying solely on the filename extension, but text-based formats may require an explicit type. Remote content must be fetched by the surrounding application and passed as bytes or a stream. Loading a whole large file into memory can therefore be an integration constraint rather than a capability implied by URL access.[2]
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]
Edition and compatibility boundaries
The feature documentation describes limited standard-library ingestion of DOCX, XLSX, PPTX and HWPX through HTML, losing original page separation and faithful layout. It points to the separate Pro product where faithful Office rendering matters. Other documentation presents Office support under Pro, so deployments should verify their exact version and input path rather than assume uniform Office parity from the product family name.[1][2]
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]
Capabilities & limitations
Document rendering and extraction
supported
Combines MuPDF rendering with Python access to document contents.[1]
Extract document content, render pages and manipulate PDFs in Python · Windows, macOS, Linux, Python · Version, build and integration requirements apply