Table Cell Merging (colspan) Not Detected Correctly in PDF Tables
ADE is parsing merged cells in PDF tables as separate empty cells instead of recognizing them as colspan. This causes data loss where merged cells appear as empty in the extracted HTML.
Environment
Product: ADE (Agentic Document Extraction)
Model: DPT-2-latest
File Type: PDF datasheet
Problem Description
When extracting tables from PDF datasheets, ADE does not correctly detect cells that span multiple columns. Instead of generating colspan attributes, it creates separate empty <td> elements.
Example
Original PDF Table (visual):
In the original PDF, the 3.0 MP and 5.0 MP columns share the same value via a merged cell (the cell visually spans both columns).
Expected HTML Output:
<tr>
<td>Horizontal Angle of View</td>
<td>101°-31°</td>
<td colspan="2">95°-28°</td> <!-- Merged cell spanning 3.0 MP and 5.0 MP -->
<td>103°-47°</td>
</tr>
Actual ADE Output:
<tr>
<td>Horizontal Angle of View</td>
<td>101°-31°</td>
<td>95°-28°</td> <!-- 3.0 MP only -->
<td></td> <!-- 5.0 MP is empty! Should be merged with above -->
<td>103°-47°</td>
</tr>
Impact
This causes significant issues for downstream processing:
Data appears missing for certain columns when it should inherit from a merged cell
LLM-based analysis incorrectly reports "not specified" for specs that are actually defined
Column alignment is preserved, but semantic meaning is lost
Reproducibility
This happens consistently across multiple re-extractions of the same PDF. The issue affects multiple rows in the same table where cells are visually merged.
Question
Is there a way to improve colspan detection for merged cells?
Are there any preprocessing steps or parameters we can use to help ADE better recognize merged cells?
Is this a known limitation of the current model?