docling-project / docling-project/docling
Convoluted Reading Flow for Multi-Column PDFs
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 95
Description
### Bug
When giving Docling PDFs with mainly two column layouts as an input, the reading order gets messed up for multiple instances. Examples are Headings or paragraphs that get attributed to the reading flow of the other column, images being attributed as child of another heading or even paragraphs of the same text column being switched up in the markdown result. At the worst it even mixed up the reading order of one heading element ("Key Features" ---docling-parse----> "Features Key")
Example Files:
[Data Sheet Example 1](https://www.analog.com/media/en/technical-documentation/data-sheets/adrf5048.pdf)
[Data Sheet Example 2](https://www.minicircuits.com/pdfs/M3SWA2-63DRC+.pdf)
### Steps to reproduce
Load the files via the basic example:
```
from docling.document_converter import DocumentConverter
source = # document URL
converter = DocumentConverter()
result = converter.convert(source)
print(result.document.export_to_markdown())
```
### Docling version
Docling version: 2.27.0
Docling Core version: 2.23.2
Docling IBM Models version: 3.4.0
Docling Parse version: 4.0.0
Python: cpython-311 (3.11.10)
Platform: Linux-5.15.0-94-generic-x86_64-with-glibc2.35
### Python version
Python 3.11.10
Contributor guide
Research direction
Start with the basic DocumentConverter example in the issue and reproduce the problem using the two linked PDF files. Compare the exported Markdown with the source layout, focusing on column order, heading and paragraph placement, and image attribution; done means the reading flow consistently follows the document order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100