docling-project / docling-project/docling

Headers not detected in old docx files

Open
#1,032 2 comments 0 reactions 1 assignee Claimed by @maxmnemonic View on GitHub
bug docx
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

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.