Licensing
A PyMuPDF alternative without the AGPL.
PyMuPDF is capable software published under the AGPL-3.0, with a commercial license from Artifex for everyone who cannot meet the AGPL's terms. If you would rather not have that conversation, pdfboss covers the common reading path (text, Markdown, rendering, images) under MIT OR Apache-2.0, and it is faster at it.
The problem
Why teams go looking for one.
PyMuPDF’s documentation puts it plainly: PyMuPDF and MuPDF are available under both the open-source AGPL and commercial license agreements, and if you determine you cannot meet the requirements of the AGPL, you should contact Artifex about a commercial license. The AGPL is a copyleft license. Software that incorporates AGPL code and is conveyed to others must be licensed under the AGPL as a whole with its source available, and section 13 extends that obligation to modified versions users interact with over a network. For a SaaS product or a closed-source application, that is either a source release or a purchase order.
The alternative
What pdfboss covers.
- Text extraction with layout analysis (columns, reading order, word spacing), all pages in parallel.
- PDF to Markdown with headings, lists and tables detected from the layout.
- Styled spans: position, bounding box, font, bold, italic, underline, strikethrough, color.
- Page rendering to PNG through an anti-aliased rasterizer with its own JPEG 2000, JBIG2, CCITT and ICC decoders.
- Embedded image extraction at native size, alpha applied.
- Encrypted PDFs, async reading, and remote files over HTTP range requests.
- PDF creation: a composable write API, Markdown to PDF with CSS themes, deterministic output.
10,312 pages/s against PyMuPDF’s 435 over 40 real-world PDFs.
161.9 pages/s against 89.4 over 888 certified pages.
Safe Rust from the parser to the codecs; abi3 wheels for CPython 3.12+.
Honest gaps
What it does not cover.
- Editing existing PDFs: annotations, form fields, redaction, page insertion or deletion, incremental saves.
- OCR. Scanned pages render to PNG; text extraction reads text operators only.
- Formats other than PDF. PyMuPDF also opens XPS, EPUB, MOBI, FB2, CBZ, SVG and images.
- Rendering coverage on unusual files: MuPDF has two decades on pdfboss. pdfboss reports every dropped or approximated item instead of guessing.
If your code depends on any of those, the commercial license or one of the other permissive libraries below is the better move.
Migration
The reading path, before and after.
import pymupdf
doc = pymupdf.open("report.pdf")
text = "\n".join(page.get_text() for page in doc)
png = doc[0].get_pixmap(matrix=pymupdf.Matrix(2, 2)).tobytes("png")import pdfboss
doc = pdfboss.Document("report.pdf")
text = doc.extract_text()
png = doc[0].render(scale=2.0)Other options
Permissively licensed alternatives to PyMuPDF.
pdfboss is one of several. Licenses below are as declared on PyPI.
- pypdfium2 (BSD-3-Clause and Apache-2.0): bindings to PDFium, the engine in Chrome. Strong rendering, character-level text. Compared with pdfboss →
- pdfplumber (MIT): table extraction and layout inspection on top of pdfminer.six, rendering through pdfium.
- pypdf (BSD-3-Clause): pure Python; splitting, merging, form filling and basic text extraction.
- pdfminer.six (MIT): pure Python layout analysis, the base of pdfplumber.
Questions
- Is PyMuPDF free for commercial use?
- Under the AGPL-3.0, yes, provided you meet its terms, which include making the complete source of software that incorporates it available under the AGPL when you distribute that software or let users interact with a modified version over a network. Artifex sells a commercial license for teams that cannot meet those terms.
- Does pdfboss require me to open-source my code?
- No. pdfboss is dual-licensed MIT OR Apache-2.0. Both are permissive licenses whose obligations amount to keeping the license text and copyright notice with the software.
- What does pdfboss not do that PyMuPDF does?
- pdfboss does not edit existing PDFs (annotations, forms, redaction, page manipulation), does not do OCR, and reads PDF only. It reads PDFs (text, Markdown, styled spans, rendering, images) and creates new ones.
- How much work is the migration?
- For the reading path, a few lines per call site: pymupdf.open becomes pdfboss.Document, page.get_text() becomes page.extract_text(), and get_pixmap plus tobytes becomes page.render(scale). Pages index 0-based in both libraries.