docling-project/docling-parse
Simple package to extract text with coordinates from programmatic PDFs
What it solves
PDF documents are built as a stream of drawing instructions, not as neat text. This package makes it practical to pull out the actual content — text, vector paths, and bitmap images — together with their exact positions on the page. It does not rely on OCR; it reads the native content from programmatic PDFs (files generated by software, not scanned pages).
How it works
The parser opens a PDF and processes its internal page descriptions. You control two separate concerns through configuration objects: DecodeConfig decides how pages are computed at open time, and ContentConfig decides which entities (characters, words, lines, shapes, bitmaps) are computed and materialized per page.
The library can output text at character, word, and line granularity, each with bounding boxes. It tracks clipping regions so that text hidden by a table cell boundary is still identifiable. Duplicate removal is on by default — it eliminates exact overprints and nearby same-line copies, and you can disable it if you need to preserve repeated drawing passes.
For performance, a threaded parser can process multiple PDFs or selected pages in parallel with configurable concurrency and built-in backpressure. There is also a command-line interface for simple visualization and inspection, and the C++ core can be built separately.
Who it's for
Developers who need to extract structured content from PDFs — especially those building document conversion pipelines, search indices, or data extraction tools. It is also the underlying parser for the larger Docling document conversion project.
Highlights
- Extracts text at character, word, and line levels, each with geometric coordinates
- Also extracts vector paths and bitmap images with their positions
- Configurable content selection via
ContentConfigandDecodeConfig - Automatic removal of duplicate and overprinted cells (with adjustable tolerance)
- Tracks clipping boxes for text that is visually cut off
- Supports parallel, multi-threaded parsing with backpressure
- Provides built-in visualization tooling for debugging
- Cross-platform (macOS, Linux, Windows) and MIT licensed
Related
- Project
- Project
- Project
- Project
- Project