docling-project / docling-project/docling
Headers not detected in old docx files
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 95
Description
### Bug
When using docling to read older docx files, it cannot detect the headers. I tested it on documents created in 2019, where the headers were simply detected as normal text. However, if i make a small change to the file and re-save it, then it is suddenly able to detect the headers correctly. Seems like it does not support some older file format of docx.
### Steps to reproduce
converter = DocumentConverter()
result = converter.convert(source)
print(result.document.export_to_markdown())
where source is the file path to the file from 2019.
### Docling version
Tested both 2.15.1 and 2.24.0
### Python version
Python version 3.10.0
Contributor guide
Assessment
This issue has not been assessed yet.