Skip to content
dialegein

PyMuPDF

Fast Python document library built on MuPDF, with genuine destructive redaction.

Operated by Artifex Software, Inc.

Visit PyMuPDF

Opens the vendor's own site.

Jobs covered

Open a task to see exactly what the vendor documentation supports.

Protect Browse all protect tools

protecting PDFs with PyMuPDF, where the Document.save() API documents the encryption parameter with the PDF encryption method codes, the permissions parameter for document permissions, and the owner_pw and user_pw password arguments, and the documentation notes that non-PDF documents are saved in PDF format while PDF files are saved in their current state; the scope records the documented encryption and permission write options and makes no claim about which readers honour the permission flags

View Browse all view tools

rendering PDF pages for viewing with PyMuPDF, where the page-rendering and Pixmap documentation shows Page.get_pixmap() rendering a page to an image at a resolution that can be changed (96 dpi by default), with clip regions, annotation inclusion or suppression, and Pixmap scaling; the scope records page and clip rendering to Pixmaps and image files, and makes no claim to be an interactive PDF viewer, GUI application or hosted display service

Extract Browse all extract tools

extracting content from documents with PyMuPDF, where the Text how-to documents Page.get_text() and its plain, blocks, words, dict and rawdict modes, extraction as Markdown, key-value extraction, table content extraction, rectangle and reading-order recipes, and the Images how-to documents embedded image extraction and non-PDF image handling; the documentation also notes that default text output is the text as coded in the document with no effort to prettify and that output may not be in usual reading order, which is why the scope records the extraction modes and marks, and makes no readability, accuracy or OCR claim (OCR is the separate job)

Convert Browse all convert tools

converting supported document types such as Markdown and XPS to PDF, and rendering PDF pages to images and SVG

Merge Browse all merge tools

merging documents with PyMuPDF, where the Document API documents Document.insert_pdf() for inserting pages from another PDF and Document.insert_file() for inserting pages from arbitrary documents, alongside page insertion, copying and deletion operations; the scope records joining and page-insertion from PDFs and other supported documents, and makes no claim about preserving signatures, forms, links or annotations across a merge

Edit Browse all edit tools

editing PDF content with PyMuPDF, where the Annotations how-to documents adding new annotations with Page methods and modifying them with the Annot class, notes that annotations can only be inserted in PDF pages, and the Text and Images how-tos document inserting text and images, the Widget class documents form fields and the Document API documents metadata and page operations; the scope records annotations, inserted text and images, form fields and metadata, and does not claim reflow or rewriting of existing page body text, which the redaction route handles by removing content and the separate redaction capability covers

OCR Browse all ocr tools

running OCR with PyMuPDF, where the OCR documentation says the integrated OCR support is based on Tesseract-OCR, which must be installed as a separate application, and documents OCR for images through Pixmap.pdfocr_save() and Pixmap.pdfocr_tobytes() and for document pages through Page.get_textpage_ocr(); the scope records the Tesseract-backed OCR path, notes that the external Tesseract installation and its language data are required, and makes no accuracy guarantee or bundled-language-count claim

Compress Browse all compress tools

compressing PDFs with PyMuPDF, where the Compressing Files documentation describes Document.save() options for garbage collection levels 0 to 4 for unused and duplicate objects, deflate compression of streams including Flate and experimental Brotli, use_objstms for packing object definitions into compressed streams, and related image and font compression options, with worked examples showing different file-size outcomes on one control document; the scope records the save-time compression controls and makes no lossless or guaranteed size-reduction claim

Where your files are processed

No server involved

A native Python extension linking the MuPDF C engine, so parsing, rendering and redaction all run in the calling process. Its README states there are no telemetry calls and no cloud dependencies. That is a property of the library itself: what an application built with it does with your file depends on that application, not on this.

Architectural: a native Python extension linking the MuPDF C engine, so parsing, rendering and redaction all execute in the calling process. The README states there are no telemetry calls, no licence validation callbacks and no cloud dependencies, so it works air-gapped.

What it does

PyMuPDF 1.28.2 binds the MuPDF C engine into Python for extraction, rendering and editing of PDF along with XPS, EPUB, MOBI, comics and image inputs. It renders pages to pixmaps, pulls text, tables and vector graphics, runs Tesseract OCR, reads and writes annotations, form fields, outlines and metadata, merges and splits documents, and applies encryption.

Redaction is a deliberate two-step API: annotate an area, then apply the redactions to permanently strip the underlying content.

Best for

Teams that need high-speed rendering plus genuinely destructive redaction in Python, and whose licence position can accommodate AGPL or an Artifex commercial licence.

Worth knowing

AGPL-3.0 is a hard blocker for a closed-source network service unless a commercial licence is bought from Artifex, which the documentation names as the exclusive commercial licensing agent for MuPDF; the standard library itself has no hosted service, cloud API or managed endpoint, and PyMuPDF Pro, which adds Office formats, is a separate product. PyMuPDF is not a viewer application: it renders pages to Pixmaps and the surrounding code has to display them.

It is not thread-safe, and the maintainers recommend multiprocessing. Redaction is a deliberate two-step annotate-then-apply API rather than a single call, and the changelog shows a long stream of redaction fixes, including incomplete removal of vector graphics and text falling outside the annotated box, so anyone relying on it should regression-test rather than assume.

The command-line entry point wraps a small set of utilities rather than the full API, and redaction is reachable only from Python. OCR is not bundled: it is based on Tesseract, which must be installed separately with its language data before any OCR call works.

Text extraction by default makes no effort to prettify or restore natural reading order, and compression results depend on the document and the save options chosen (garbage, deflate, object streams, image and font compression) rather than being guaranteed.

Details, and where each comes from

Vendor statements, our own reading of their pages, and the things nobody has established yet, each answered separately. Where we have not confirmed something it says so rather than guessing, and a row nobody has established is greyed out.

Versions covered
Windows · macOS · Linux
Website
pymupdf.readthedocs.io
Requires an account
Not applicable
Watermark on the free tier
Not verified
Maximum file size
Not verified
Batch processing
Yes
Data residency
Self-hosted
Open source
Yes
Self-hostable
Yes
Licence
AGPL-3.0 or commercial, dual-licensed.

AGPL-3.0 or commercial, dual-licensed. The documentation says PyMuPDF and MuPDF are available under both the open-source AGPL and commercial licence agreements, and names Artifex as the exclusive commercial licensing agent for MuPDF.

The PyPI metadata describes the licence as Dual Licensed - GNU AFFERO GPL 3.0 or Artifex Commercial License, and the documentation gives Artifex Software Inc., 39 Mesa Street, Suite 108A, San Francisco CA 94129, United States as the contact. No commercial price is published on the pages read, so none is recorded.

PyMuPDF Pro, which adds Office document formats, and PyMuPDF4LLM are separate products in the suite rather than part of the standard library.

Redaction
Removes the content
Programmatic access
Embeddable library · Command line
Last availability check
Responded in 134 ms 21 October 2026

Checked automatically by our own runner, not reported by the vendor. 100% of our last 30 checks got a response.

What the redaction verdict rests on

Tested by us on 17 September 2026, on our own canary document rather than read off a product page.

What that does not establish

Tested on our own canary document. Deletes the marked text from the page structure and paints a fill.

Verified on one document and one version.

What the vendor says

Claims are labelled rather than repeated as fact. Where we have checked something ourselves, it says so and shows when. Checked means we read the vendor's own page and it says what we recorded - not that we tested the behaviour, unless the note says we did.

  • “Step 2: Apply - permanently removes the underlying content”

    Checked by us - the source says this Read 22 September 2026

    Confirmed, and this is the strongest kind of entry in the register - the wording and our own observation agree. The README's answer to 'How do I permanently redact (remove) content from a PDF?' carries the line '# Step 2: Apply - permanently removes the underlying content', which is the claim unaltered, and adds: 'After apply_redactions(), the original content is gone.

    It cannot be recovered from the saved file.' Our own test found the same: the marked text is deleted from the page structure and a fill is painted, and the canary string did not survive in the saved file. Two limits worth recording that the README states and the claim does not: redaction is deliberately two-step, marking then applying, so a document saved between the two steps is unchanged; and the text is removed from what PyMuPDF examines, which is the page content, so the same caveats about annotations, forms and embedded files that pikepdf documents apply here as well.

    Standing: Re-read, and the recorded hash was not reproduced

    Check it yourself: the source, the SHA-256, and how we checked
    From
    the text a browser renders
    SHA-256
    7008f1cadaff06ca8bd249db6aaef2aad22665897de92e8db4798c79969c985b
    Note
    no saved artifact matches this hash, so there is nothing to normalise towards. Both a raw fetch and a render of the About page fail to reproduce it.

    How we checked

    Re-verified verbatim on 2026-09-22: https://github.com/pymupdf/PyMuPDF re-rendered in headless Chrome with scripts/render-page.mjs and the claim's wording found in the rendered text. Originally verified on 2026-09-21. sourceHash is the SHA-256 of the re-rendered text, held as rv-github-com-pymupdf-PyMuPDF-032c63dc.txt.

    What this hash proves, and what it does not

  • “PyMuPDF and MuPDF are now available under both, open-source AGPL and commercial license agreements.”

    Checked by us - the source says this Read 22 September 2026

    Confirmed verbatim: the sentence appears unaltered in the About page. The page continues with the practical half, which is what a reader needs: the AGPL terms are in the distribution as a COPYING file, and "if you determine you cannot meet the requirements of the AGPL, please contact Artifex for more information regarding a commercial license".

    This is the third Artifex licence in this batch alongside Ghostscript and MuPDF, and the fourth AGPL-plus-commercial structure alongside borb and iText, so the index now records the same licensing shape across five projects. This is also the project whose redaction behaviour was established by test earlier in this index - see pymupdf#2 - where the testing method is recorded rather than a reading.

    Standing: Re-read and matched byte for byte

    Check it yourself: the source, the SHA-256, and how we checked
    From
    the text a browser renders
    SHA-256
    fcf34285f17e7149deeccb54b69ccb585fdbff69973e143900fe880cab1179a2

    How we checked

    Re-verified verbatim on 2026-09-22: https://pymupdf.readthedocs.io/en/latest/about.html re-rendered in headless Chrome with scripts/render-page.mjs and the claim's wording found in the rendered text. Originally verified on 2026-09-21. sourceHash is the SHA-256 of the re-rendered text, held as rv-pymupdf-readthedocs-io-en-latest-about-html-82d82f92.txt.

    What this hash proves, and what it does not

  • “Text contained in a redaction rectangle will be physically removed from the page (assuming Document.save() with a suitable garbage option) and will no longer appear in e.g. text extractions or anywhere else.”

    Checked by us - the source says this Read 22 September 2026

    RE-QUOTED 2026-09-22: this claim previously read "Redaction is genuine removal: annotate the area, apply the redactions, and the content underneath is deleted rather than covered." - our characterisation rather than the vendor's wording, so a reader could not tell a quotation from a summary. The vendor's own sentence is now in the claim field and what we read from it follows here.

    The boxed string is gone from the saved file; the lines 40pt above and below it survived, as did the untouched second page, so the removal is localised. The output contains zero image XObjects, so nothing was rasterised: the marked text is deleted from the page structure and a solid fill is drawn in its place. qpdf reports no errors and agrees on every marker.

    This matters more here than elsewhere: PyMuPDF's own changelog records a long stream of redaction fixes, including incomplete removal of vector graphics and text falling outside the annotated box, so the record warns readers to regression-test rather than assume. It passed this test - one document, one box, one version - which is evidence and not a warranty.

    Standing: Re-read and matched byte for byte

    Check it yourself: the source, the SHA-256, and how we checked
    From
    the raw HTTP response
    SHA-256
    d995809985f9fbed54cdde23cfff7e3782950c7342e6697622ba35729408dcc7

    How we checked

    Re-verified verbatim on 2026-09-22: https://pymupdf.readthedocs.io/en/latest/page.html rendered in headless Chrome with scripts/render-page.mjs, and this sentence found in the rendered text. ALSO RE-QUOTED on the same date: the claim field previously held our own summary of this page rather than the vendor's sentence, which made it impossible to verify by quotation - the schema's own words are "we do not repeat a vendor's claim as though it were our own finding", and the reverse holds too. sourceHash is the SHA-256 of the rendered text, held as p12-pymupdf-page.txt.

    What this hash proves, and what it does not

Each claim is quoted from the vendor's own pages. This section describes what we have and have not checked - it is not a judgement about anyone.

Sponsorship is distribution, not an endorsement or a promise of search rankings, AI citations, traffic, or sales. This listing is a free entry, compiled from published sources.

Visit PyMuPDF Report a problem

Related reading

How this record was put together

Editorial review.
No editor has signed this record off. That is not the same as nothing having been checked, and the lines below say what has.
Source reading.
3 claims taken from the vendor's own pages, read between 22 September 2026 and 22 September 2026.
Website availability.
The vendor's site was last checked on 21 October 2026.
Behaviour testing.
We ran this ourselves. The file handling was watched directly.

Sources: pymupdf.readthedocs.io (home, about, annotations recipes); github.com/pymupdf/PyMuPDF README and COPYING; GitHub API metadata.