docling-project / docling-project/docling
Issues with Table Extraction on Densely Aggregated Columns, Irregular Row Heights, and Merged Cells
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 84
Description
---
### **Bug**
Docling’s table extraction produces **incorrect, inconsistent, or scattered output** when processing PDFs that contain:
1. **Densely aggregated / tightly spaced columns**
* Columns positioned very close together are misinterpreted.
* Multiple adjacent columns are merged into a single column or split incorrectly.
2. **Inconsistent or varying row heights**
* Rows with different heights cause Docling to scatter text.
* Content belonging to one logical row appears across several extracted rows.
3. **Merged cells (rowspan/colspan)**
* Docling fails to detect merged cells.
* Merged header or body cells are output as duplicated, fragmented, or misaligned cell values.
* Table structure becomes distorted.
As a result, the extracted table does not match the visual structure of the PDF and loses critical alignment information.
---
### **Steps to Reproduce**
1. Use a PDF containing any of the following:
* Very tightly packed vertical columns
* Rows with inconsistent heights or multi-line content
* Merged header or body cells (rowspan/colspan)
2. Run the standard Docling extraction pipeline:
3. Inspect the extracted tables.
The rows and columns appear misaligned, merged incorrectly, or scattered.
---
### **Expected Behavior**
Docling should:
* Correctly detect column boundaries even when columns are densely spaced
* Maintain row integrity even when heights differ
* Identify merged cells and represent them consistently
* Produce a stable, structured table that matches the PDF layout
---
### **Docling Version**
Name: docling
Version: 2.64.0
...
---
### **Python Version**
Python 3.12.3
Contributor guide
Assessment
This issue has not been assessed yet.