Docling is IBM Research's open-source, MIT-licensed PDF parser that runs entirely locally — no cloud upload, no API key, no per-page cost. It uses a layout detection model, TableFormer (a deep-learning table structure model), and optional OCR to extract rich document structure. The post shows how to wrap Docling into the same relational table contract (line_df, image_df, toc_df, object_registry, etc.) used by PyMuPDF and Azure Document Intelligence, making it a drop-in local alternative for confidential or air-gapped enterprise environments. Key gains over PyMuPDF include: table cells with row/column structure, reconstructed TOC from layout labels (28 headings vs. 0 from fitz), caption detection via layout labels rather than regex, and figure OCR text. The recommended strategy is to default to fitz for speed, escalate to Docling for confidential documents or when fitz misses tables/scans, and use Azure DI only when cloud upload is acceptable.

18m read timeFrom towardsdatascience.com
Post cover image
Table of contents
1. The cloud is the constraint, not the capability2. Same contract, run locally3. What each table gains4. The parsing_method column: provenance for adaptive parsing5. Cost, latency, and setup6. When to call which7. Conclusion8. Sources and further reading
288 Impressions