Features Comparison#
Feature matrix#
The following table illustrates how PyMuPDF compares with other typical solutions.
Feature | PyMuPDF | pikepdf | PyPDF2 | pdfrw | pdfplumber / pdfminer |
---|---|---|---|---|---|
Supports Multiple Document Formats | PDF XPS EPUB MOBI FB2 CBZ SVG Image | ||||
Implementation | C and Python | C++ and Python | Python | Python | Python |
Render Document Pages | All document types | No rendering | No rendering | No rendering | No rendering |
Extract Text | All document types | PDF only | PDF only | ||
Extract Tables | |||||
Extract Vector Graphics | All document types | Limited | |||
Draw Vector Graphics (PDF) | |||||
Based on Existing, Mature Library | MuPDF | QPDF | |||
Automatic Repair of Damaged PDFs | |||||
Encrypted PDFs | Limited | Limited | |||
Linerarized PDFs | |||||
Incremental Updates | |||||
Integrates with Jupyter and IPython Notebooks | |||||
Joining / Merging PDF with other Document Types | All document types | PDF only | PDF only | PDF only | PDF only |
OCR API for Seamless Integration with Tesseract | All document types | ||||
Integrated Checkpoint / Restart Feature (PDF) | |||||
PDF Optional Content | |||||
PDF Embedded Files | Limited | Limited | |||
PDF Redactions | |||||
PDF Annotations | Full | Limited | |||
PDF Form Fields | Create, read, update | Limited, no creation | |||
PDF Page Labels | |||||
Support Font Sub-Setting |
Performance#
To benchmark PyMuPDF performance against a range of tasks a test suite with a fixed set of 8 PDFs with a total of 7,031 pages containing text & images is used to obtain performance timings.
Here are current results, grouped by task:
- Copying
This refers to opening a document and then saving it to a new file. This test measures the speed of reading a PDF and re-writing as a new PDF. This process is also at the core of functions like merging / joining multiple documents. The numbers below therefore apply to PDF joining and merging.
The results for all 7,031 pages are:
⏱
- Text Extraction
This refers to extracting simple, plain text from every page of the document and storing it in a text file.
The results for all 7,031 pages are:
⏱
- Rendering
This refers to making an image (like PNG) from every page of a document at a given DPI resolution. This feature is the basis for displaying a document in a GUI window.
The results for all 7,031 pages are:
⏱
Note
For more detail regarding the methodology for these performance timings see: Performance Comparison Methodology.
License and Copyright#
PyMuPDF and MuPDF are now available under both, open-source AGPL and commercial license agreements. Please read the full text of the AGPL license agreement, available in the distribution material (file COPYING) and here, to ensure that your use case complies with the guidelines of the license. If you determine you cannot meet the requirements of the AGPL, please contact Artifex for more information regarding a commercial license.
Artifex is the exclusive commercial licensing agent for MuPDF.
Artifex, the Artifex logo, MuPDF, and the MuPDF logo are registered trademarks of Artifex Software Inc.
This documentation covers PyMuPDF v1.23.5 features as of 2023-10-11 00:00:01.
The major and minor versions of PyMuPDF and MuPDF will always be the same. Only the third qualifier (patch level) may deviate from that of MuPDF.