Enhanced Table Extraction in PyMuPDF4LLM 1.28

Jamie Lemon·July 9, 2026

PyMuPDF4LLMTable Extraction
PyMuPDF4LLM - improved table extraction

Better and Faster Table Structure Extraction

PyMuPDF4LLM 1.28 includes a major upgrade to table extraction, when used with the Layout module (the default). This upgrade focuses on one of the hardest problems in document intelligence: tables.

What’s new

PyMuPDF4LLM 1.28 performs:

  1. Table bounding box detection (as before, but improved)
  2. Table structure detection
    • Row segmentation
    • Column segmentation
    • Cell grid reconstruction
  3. Unified processing inside the Layout module table understanding is now part of the core layout analysis.

Why this is important

Tables are critical for:

  • LLM ingestion
  • RAG pipelines
  • Financial and scientific documents
  • Compliance and audit workflows
  • Data extraction and analytics

Accurate table structure extraction dramatically improves downstream model performance.

Visual examples

Here are some examples to understand the improvements:

Improved Table Segmentations

Improved Table Segmentations

Our previous logic occasionally did not always detect the complete internal table structure. The left hand side exhibits missing column dividers. The right hand part shows complete table grid detection.

In this example the previous logic sometimes was over-zealous to detect table cells and thereby disrupted logical context:

Improved Multi-Line Cell Detection

Improved Multi-Line Cell Detection

The bottom part shows improved cell boundary detection: the column headers in this will now be extracted consistently.

These examples illustrate how the new Layout module in PyMuPDF4LLM 1.28 handles complex tables with far greater precision than before.

How to Extract

Use with the regular PyMuPDF4LLM API, no additional API calls required as the underlying Layout module will deliver enhanced results:

md = pymupdf4llm.to_markdown(“doc.pdf”)
json = pymupdf4llm.to_json(“doc.pdf”)
txt = pymupdf4llm.to_text(“doc.pdf”)

If there are tables in your source document then they should be faithfully reflected in your output. If not then please let us know!

Conclusion

PyMuPDF4LLM 1.28 is a significant update, many months in the making and built for the AI era. With enhanced table extraction we aim to stay ahead of the curve and keep delivering better results with each release.



Discuss This Article with the Community

Have a question, a different approach, or something you built after reading this? Share it on the forum or join the Discord, we'd love to hear from you.