Third-party toolUpdated 2026.11.14

PyMuPDF4LLM 2.1: Package Changes and Empty PDF Output

PyMuPDF4LLM 2.1 code now ships in PyMuPDF. Test a text PDF and an empty-text PDF with OCR disabled, then check content rather than conversion success.

Aaron recommends Open official GitHub

PyMuPDF4LLM 2.1 changes the packaging: the namesake distribution is a compatibility placeholder, while the 4LLM code ships in PyMuPDF 2.x. Installing pymupdf4llm==2.1 resolved pymupdf==2.1 in this test, and the pymupdf4llm import remained usable. A synthetic text PDF retained its sentence; a textless fixture returned whitespace with OCR disabled.

To compare output from the same document, see MarkItDown's acceptance checks and Docling's table checks, then inspect text, columns and reading order separately.

Check the implementation package

The upstream repository README describes the move and recommends installing pymupdf. The example pins both distributions to 2.1 so a later dependency resolution cannot silently select another implementation. Older descriptions of package size or dependencies should not be carried forward without checking the version.

Create a text and a textless control

Use pymupdf.open() to make a one-page PDF with Dispatch NOTE-31 leaves at 08:30. at (72,72). Make a second PDF containing only a rectangle. That is a control for absent text, not a scanned photograph or a representative scan benchmark.

These commands use a POSIX shell. The test ran in Linux; Windows shell behavior was not tested.

python -m pip install "pymupdf==2.1" "pymupdf4llm==2.1"
python - <<'PY'
import pymupdf4llm
for name in ["text.pdf", "no-text.pdf"]:
    text = pymupdf4llm.to_markdown(name, use_ocr=False)
    print(name, repr(text), bool(text.strip()))
PY

Inspect output with OCR explicitly disabled

to_markdown(..., use_ocr=False) preserved the full sentence in the first PDF and returned only whitespace for the rectangle-only PDF. Both input hashes stayed unchanged. A pipeline should check stripped output before sending it to search or RAG. An empty result is different from a crash and does not justify inventing missing text.

Untested behavior and selection

OCR, multicolumn layout, tables, page chunking, and image handling are documented from official v2.1 material and were not locally tested. No accuracy or performance comparison was conducted. For Word or HTML table inputs, the existing Docling guide covers a different tested scope. Choose based on the source text layer and structure you need, then verify a known-answer sample.

Official sources and test scope

Codex ran this synthetic-data test in a credential-free, non-root, network-disabled container. It is not a claim that the site owner tested it. Package version: 2.1; documentation snapshot: 1200f2aea929.

Subscribe to AI tool picks and practical advice

Get worthwhile tool picks, test findings and important updates in your inbox.

Get a monthly-updated list of AI tools and Skills right away. We email when there are worthwhile tool picks, test findings or important updates. Unsubscribe anytime. Privacy

Almost done: check your inboxClick the button in the confirmation email and you will get the download link for the tool list. If you do not see it, check your spam or Promotions folder.

Or follow us on: