Back to blog

PyMuPDF License Explained: AGPL, Commercial Use and Alternatives

The licenses of PyMuPDF, PyMuPDF4LLM, PyMuPDF Layout and PyMuPDF Pro, what the AGPL and Artifex say about SaaS, and permissively licensed alternatives.

PyMuPDF is dual-licensed. You can use it under the GNU AGPL-3.0, or under a commercial license that you buy from Artifex Software, which owns PyMuPDF and MuPDF. Since PyMuPDF 2.0, the same two options cover PyMuPDF4LLM and PyMuPDF Layout, because their code now ships inside the pymupdf package. PyMuPDF Pro, now called PyMuPDF Office, is commercial only. Artifex does not offer PyMuPDF under MIT or any other permissive license, and it does not publish prices for its commercial licenses.

This is not legal advice. It summarizes the license text and what Artifex states on its own pages as of October 20, 2026.

Disclosure: Parsebridge, which publishes this blog, sells a hosted Docling API.

PyMuPDF license at a glance

PackageLicense as statedSource
pymupdf 2.0 (October 19, 2026)“Dual Licensed - GNU AFFERO GPL 3.0 or Artifex Commercial License”PyPI, COPYING on GitHub (AGPL-3.0)
PyMuPDF4LLMSame as PyMuPDF. The code is part of pymupdf 2.0; pymupdf4llm 2.0 on PyPI is an empty placeholderPyMuPDF FAQ, GitHub LICENSE (AGPL-3.0)
PyMuPDF Layout (pymupdf-layout)Same as PyMuPDF. The code is part of pymupdf 2.0. Releases before 1.28.2 used different terms (see below)PyPI
PyMuPDF Office, formerly PyMuPDF Pro”Commercial license. See artifex.com for details.”PyPI
MuPDF, the C library underneathAGPL or commercial, like PyMuPDFPyMuPDF docs

Artifex announced that it had acquired “the exclusive rights and all intellectual property to PyMuPDF” from its long-time maintainer Harald Lieder in a statement dated June 23, 2021.

Two changes explain searches like “pymupdf4llm license” and “pymupdf layout license”:

  • PyMuPDF4LLM moved into PyMuPDF. The pymupdf4llm 2.0 package contains no code. Its description says “The pymupdf-2.x package now contains the 4llm code that used to be in pymupdf4llm-1.x.” Earlier releases were also listed under the AGPL. Our Docling vs PyMuPDF4LLM test covers what the move means for installing it.
  • PyMuPDF Layout was not open source until August 2026. On PyPI, the first pymupdf-layout release (1.26.6, November 2025) was listed as “Commercial license”, and 1.27.1 through 1.28.0 as “Dual Licensed - Polyform Noncommercial or Artifex Commercial License”. In an August 10, 2026 post, Artifex announced that from 1.28.2 “PyMuPDF Layout is licensed under the GNU AGPL v3” and published its source. In 2.0 the layout models are files inside the pymupdf wheel, which carries the single dual license. If you pinned an older pymupdf-layout, check which version you have.

What the AGPL-3.0 says

The AGPL-3.0 follows the GPL-3.0 and adds section 13 about network use. The parts that come up most for a library like PyMuPDF:

  • Running it. Section 2 “explicitly affirms your unlimited permission to run the unmodified Program” and says “You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force.”
  • Distributing it. To “convey” means any propagation “that enables other parties to make or receive copies.” For a work based on the program that you convey, section 5(c) says “You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy.” Section 6 lets you convey object code only if you also convey the Corresponding Source.
  • Network use. The license says “Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.” Section 13 adds: “if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version.”

The text of section 13 refers to a version you have modified. Artifex describes the obligations for server use more broadly.

What Artifex says

On its licensing page, Artifex lists the conditions it attaches to the free AGPL license, including:

  • “You cannot deploy our open-source as part of a server-based application or service, without disclosing your own application’s full source code under AGPL to any users interacting with it.”
  • “Any modifications to our open-source must be disclosed under the AGPL, including sharing the modified code with any users interacting with it.”
  • You “ideally should also retain the producer line in all PDFs created or modified using our open-source.”
  • “If you can’t meet the requirements of the GNU AGPLv3 above, a commercial license is required.”

The PyMuPDF FAQ says of PyMuPDF4LLM: “If you’re using it as part of a commercial product’s data pipeline (even if it’s just parsing PDFs for a RAG system), the AGPL obligations apply.” It asks you to contact Artifex “to evaluate your situation.”

Artifex’s August 2026 post has a short table for common cases:

If you’re…Then… (Artifex’s wording)
Building an open-source project under AGPL-compatible terms”Use it freely under the AGPL”
Doing internal work you never distribute or expose as a service”The AGPL obligations generally don’t bite”
Shipping a proprietary product, or running it behind a public API or SaaS”The AGPL’s network clause applies and you’ll need a commercial license”

Common situations

Internal scripts and tools. The AGPL lets you run the unmodified program, and copies you don’t convey carry no conditions. Artifex’s table says the obligations “generally don’t bite” for internal work that is never distributed or exposed as a service. Its PyMuPDF licensing page still lists “Internal Enterprise Tooling” among the uses for a commercial license, for support and predictable terms.

Shipping software to customers. A desktop app, an on-premises install or a Docker image you hand to customers conveys PyMuPDF, so the AGPL’s conditions for conveying apply. Artifex sells an OEM Distribution license for this case, with “No need to disclose your code.”

A closed-source SaaS or API that uses PyMuPDF on the server. Artifex’s position is that this requires disclosing your application’s full source code to its users under the AGPL, or a commercial license. Its licensing page for PyMuPDF lists “SaaS & Hosted Products” as a commercial use case.

An MIT or Apache-licensed project that depends on PyMuPDF. PyMuPDF can arrive as an indirect dependency. In browser-use issue #2610, opened in August 2025, a user reported that the MIT-licensed browser-use pulled in PyMuPDF through the markdown-pdf package. The maintainers merged a pull request that replaced markdown-pdf with the BSD-licensed reportlab and closed the issue on September 6, 2025. Package labels can also be wrong. The langchain-pymupdf4llm integration was listed on PyPI as MIT through version 0.4.1 (May 2025), and its NOTICE file now says “Earlier releases of this package were labeled as MIT. That was incorrect” and that it is AGPL-3.0 only. To see whether a package in your environment requires PyMuPDF, run pip show pymupdf and read the Required-by line.

Commercial license and pricing

Artifex sells commercial licenses through its sales team. Its licensing page says “Each Artifex commercial license is crafted based on your individual use case” and lists two models:

  • OEM Distribution: distribution without AGPL requirements, annual reporting on distribution volume, and a “Per-copy cost with a quarterly minimum fee.”
  • Subscription: the same terms, with no report needed for internal use.

Neither artifex.com/licensing nor pymupdf.io/licensing publishes a price, so the cost of a PyMuPDF commercial license is quote-based. Both pages send you to Artifex’s contact form. Price figures on third-party review sites are not confirmed by Artifex.

PyMuPDF Office (pip install pymupdf-office) is the product formerly called PyMuPDF Pro. Its PyPI page says “Historically this was the PyMuPDF ‘Pro’ product, since renamed ‘Office’,” and the old artifex.com PyMuPDF Pro page now redirects to pymupdf.io/office. It adds DOC/DOCX, XLS/XLSX, PPT/PPTX and HWP/HWPX support to PyMuPDF, with conversion to PDF, Markdown and JSON. Without a license key, “Only the first 3 pages of any document will be available.” Artifex offers trial keys to evaluate it for a limited time. The old pymupdfpro package stopped at 1.28.2 (August 2026), pinned to PyMuPDF 1.28.2.

Permissively licensed alternatives

If neither the AGPL nor a commercial license fits, these Python tools extract text or Markdown from PDFs under permissive licenses. Licenses are from each project’s PyPI metadata and license file, checked on October 20, 2026.

ToolLicenseWhat it gives youNotes
DoclingMITMarkdown, HTML and JSON with tables, layout and OCRDefault layout model Apache-2.0, TableFormer weights CDLA-Permissive-2.0 and Apache-2.0
MarkItDownMITMarkdown from PDFs and Office filesPDF text via pdfminer.six and pdfplumber, no OCR
pdfplumberMITCharacters, words, lines and tablesBuilt on pdfminer.six and pypdfium2
pdfminer.sixMITText with layout analysisPure Python
pypdfBSD-3-ClauseText extraction, splitting, mergingPure Python
pypdfium2Apache-2.0 or BSD-3-ClauseText extraction and page rendering with PDFiumPDFium has a BSD-style license; the README notes some builds link libgcc
UnstructuredApache-2.0Document elements as JSONFor PDFs its README requires Poppler, which is GPL-2.0, and Tesseract (Apache-2.0); pdf2image runs Poppler’s command-line tools

Two popular converters are open source with extra conditions:

  • Marker code is Apache-2.0. Its model weights use a modified OpenRAIL-M license, free for research, personal use and startups under $5M in funding or revenue. The model license also excludes companies offering a product that competes with Datalab’s. Above those limits, Datalab sells a license.
  • MinerU uses the MinerU Open Source License: Apache 2.0 plus a separate commercial license if you and your affiliates exceed 100 million monthly active users or $20 million monthly revenue, and clear attribution if you offer an online service based on it.

For how these tools compare on real PDFs, see our tested roundup of PDF to Markdown converters, Docling vs PyMuPDF4LLM, Docling vs MarkItDown, Docling vs MinerU and LlamaParse vs Docling vs Marker. In our tests PyMuPDF4LLM converted a 60-page report about 17 times faster than Docling, so switching can cost speed on born-digital PDFs.

Parsebridge

Parsebridge is a hosted Docling API. Your code sends a PDF over HTTP and gets Markdown back, so no PDF library ships in your application. It runs Docling with TableFormer in accurate mode and does not use PyMuPDF. It accepts PDFs up to 50 MB. New accounts get 50 free pages once, and plans are $17 a month for 5,000 pages, $79 for 60,000 and $259 for 300,000.

To see Docling’s output on one of your own PDFs first, the free PDF to Markdown converter converts the first page of a PDF up to 10 MB without an account, five times per hour.