docling-project / docling-project/docling
DoclingParseV4 backend produces glyph IDs (/gidXXXXX) for PDFs with custom embedded fonts without ToUnicode map
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 84
Description
## Bug description
When processing PDFs with custom embedded fonts that lack a ToUnicode map, DoclingParseV4DocumentBackend produces glyph IDs (/gid00020/gid00016...) instead of readable text.
pdfMiner correctly extracts the text from the same file, proving the text layer exists and is readable.
## Expected behavior
Docling should detect the garbage output and fallback to plain text extraction ignoring the embedded font mapping. Or simply ignore custom font mapping and use fallback to plain text
### Steps to reproduce
analize the document. and output it to .md and to docling.json
### OS
Debian 13
### Docling version
docling 2.76.0
### Python version
3.13.5
[12-gestione-del-parto-pretermine-min-2.pdf](https://github.com/user-attachments/files/25815523/12-gestione-del-parto-pretermine-min-2.pdf)
Contributor guide
Assessment
This issue has not been assessed yet.