docling-project / docling-project/docling
Partial or no data extracted from single-row tables without headers
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 84
Description
### Bug
When processing the attached PDF file (_empty_output.pdf_), which contains a table with a single row and no headers, the tool produces an empty output. The first two columns in the row are empty, but the third column contain data. No content is extracted.
In other similar PDFs, the output is partially extracted.
### Steps to reproduce
1. Run Docling on the attached _empty_output.pdf_.
2. Observe that the output is empty and no table data is extracted.
```
from docling.datamodel.base_models import InputFormat
from docling.datamodel.pipeline_options import PdfPipelineOptions, TableFormerMode
from docling.document_converter import DocumentConverter, PdfFormatOption
def extract_data_with_docling(input_data_path):
pipeline_options = PdfPipelineOptions(do_table_structure=True)
pipeline_options.table_structure_options.mode = TableFormerMode.ACCURATE
doc_converter = DocumentConverter(
allowed_formats=[InputFormat.PDF, InputFormat.IMAGE],
format_options={
InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options)
},
)
result = doc_converter.convert(input_data_path)
markdown_content = result.document.export_to_markdown()
print(markdown_content)
extract_data_with_docling("PDF PATH")
```
### Docling version
Docling version: 2.31.0
Docling Core version: 2.28.1
Docling IBM Models version: 3.4.1
Docling Parse version: 4.0.0
### Python version
Python 3.10.11
[empty_output.pdf](https://github.com/user-attachments/files/20299316/empty_output.pdf)
Contributor guide
Assessment
This issue has not been assessed yet.