docling-project / docling-project/docling

Table extraction: Robust row banding via y-clustering and numeric column guides (fix multi-label first-column merges)

Open
#2,331 1 comment 0 reactions 0 assignees View on GitHub
enhancement triage/close-stale
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

### Requested feature
Some PDFs render the first column’s labels as tightly stacked lines with minimal vertical whitespace. The current row splitter treats several labels as one row (e.g., “Caption Footnote Formula …”), causing row count collapse and column misalignment.

Code:
```
from docling.document_converter import DocumentConverter

source = "https://arxiv.org/pdf/2408.09869"

conv = DocumentConverter()
doc = conv.convert(source).document

md = doc.export_to_markdown()
with open("out.md", "w", encoding="utf-8") as f: f.write(md)

```

PDF table having issues is on the page 8: https://arxiv.org/pdf/2408.09869

Image

Before (bug)
```
Row0 col0: "Caption Footnote Formula List-item Page-footer Page-header Picture Section-header Table Text Title All"
Row0 col1..N: all metrics crammed/misaligned
```

After (expected)
```
Row0 col0: "Caption" | human: 84–89 | MRCNN R50/R101: 68.4, 71.5, 70.9, 71.8 | FRCNN R101: 70.1, 73.7, 63.5 | YOLO v5x6: 77.7, 77.2, 66.2
Row1 col0: "Footnote" | ...
...
Row11 col0: "All" | ...
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.