pdfboss.dev

Licensing

Is PyMuPDF free for commercial use?

Short answer: yes, under the GNU Affero General Public License v3, a copyleft license with obligations that many commercial teams cannot meet. For those teams Artifex sells a commercial license. This page explains the difference. It was written by the maintainers of pdfboss, a competing library, and it is not legal advice.

The license

How PyMuPDF is licensed.

PyMuPDF’s documentation states that PyMuPDF and MuPDF are available under both open-source AGPL and commercial license agreements, asks you to read the full text of the AGPL to ensure your use case complies, and says that if you determine you cannot meet the requirements of the AGPL, you should contact Artifex, the exclusive commercial licensing agent for MuPDF. The PyPI metadata says the same in one line: dual licensed, GNU Affero GPL 3.0 or Artifex commercial license. pymupdf4llm, the Markdown layer, carries the same terms.

The obligations

What the AGPL asks of you.

  • Copyleft on conveyed works: if you convey a work based on the program, the whole work must be licensed under the AGPL and its corresponding source made available (sections 5 and 6).
  • The network clause: if you modify the program and let users interact with it remotely through a computer network, your modified version must offer those users the corresponding source (section 13). This is the clause that distinguishes the AGPL from the GPL, and it is aimed at SaaS.
  • Notices: keep the license and copyright notices intact.

The open questions, which the license text does not settle for Python specifically, are whether an application that imports PyMuPDF unmodified is a work based on the program, and whether it is a modified version for the purposes of section 13. The Free Software Foundation’s position on linking says yes to the first; Artifex’s guidance is to contact them if you cannot meet the AGPL. Your counsel will want to answer both for your product.

Situations

How it usually plays out.

  • An open-source project under the AGPL or GPLv3: compatible. Use PyMuPDF.
  • An internal script or batch job with no outside users: the fewest obligations, since nothing is conveyed and no outside user interacts over a network.
  • A SaaS product: section 13 is the question. Teams either satisfy it by publishing the source of the relevant service, buy the commercial license, or use a permissively licensed library.
  • A distributed product (desktop application, CLI, container image you ship): conveying a work based on AGPL code means licensing the whole under the AGPL with source available, or buying the commercial license.

The commercial license

When to buy it.

When PyMuPDF does something you need and no permissive library does: editing existing PDFs, redaction, form filling, OCR through Tesseract, or the non-PDF formats MuPDF opens. Artifex prices the license per product; the PyMuPDF documentation links to their licensing page.

The other route

If you would rather avoid the question.

For the reading path (text, Markdown, rendering, images), pdfboss is a PDF engine written from scratch in Rust, dual-licensed MIT OR Apache-2.0, with faster text extraction and rendering than PyMuPDF on the measured corpus and no C dependencies. The PyMuPDF alternative page lists what it covers, what it does not, and the other permissively licensed libraries.

Questions

Is PyMuPDF free for commercial use?
Yes, under the GNU Affero General Public License v3, which permits commercial use but is a copyleft license: software that incorporates PyMuPDF and is distributed, or that users interact with over a network in modified form, must make its complete source available under the AGPL. Teams that cannot meet those terms buy a commercial license from Artifex.
Do I need a commercial license to use PyMuPDF in a SaaS product?
Possibly. Section 13 of the AGPL covers modified versions that users interact with over a network, and whether your application counts as a modified version or a work based on PyMuPDF is a question for your counsel. PyMuPDF's own guidance is that if you determine you cannot meet the requirements of the AGPL, you should contact Artifex about a commercial license.
Can I use PyMuPDF internally without releasing anything?
The AGPL's source obligations attach to conveying the software to others and to network interaction with modified versions. Purely internal use with no outside users is the situation with the fewest obligations, but read the license text before relying on that.
What are the permissively licensed alternatives?
pdfboss (MIT OR Apache-2.0), pypdfium2 (BSD-3-Clause and Apache-2.0), pdfplumber (MIT), pypdf (BSD-3-Clause) and pdfminer.six (MIT), as declared on PyPI.