docling-project / docling-project/docling

All the "G"s in this document are recognized as GLYPH(cmap:df00) when converting PDF → DoclingDocument

Open
#2,256 2 comments 2 reactions 0 assignees View on GitHub
bug triage/close-stale
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

### Bug

When converting a PDF with docling into a DoclingDocument, every occurrence of the letter G is turned into the placeholder string GLYPH(cmap:df00).

Examples
Original text: PG → Parsed output: PGLYPH(cmap:df00)
Original text: LEG → Parsed output: LEGLYPH(cmap:df00)

All the "G"s in my document are recognized as GLYPH(cmap:df00). I tried two other libraries and the results are fine.

### Steps to reproduce

```
from docling.document_converter import DocumentConverter
input_pdf = "test.pdf"

doc = DocumentConverter().convert(input_pdf).document
cell = doc.tables[0].data.grid[0][0].text
print(cell) # Expecting "PG" getting PGLYPH(cmap:df00)

import pypdfium2 as pdfium
pdf2 = pdfium.PdfDocument(input_pdf)
page0 = pdf2[0]
textpage = page0.get_textpage()
text_all = textpage.get_text_range()
print(text_all[:3])

import fitz
pdf = fitz.open(input_pdf)
page = pdf[0]
full_text = page.get_text("text")
print(full_text[:3])

```

### Expected behavior
The text “PG”, “LEG”, etc., should be returned unchanged.

### Actual behavior
The character G is replaced by the placeholder GLYPH(cmap:df00).

### Attachments
[test.pdf](https://github.com/user-attachments/files/22297090/test.pdf)

### Docling version

Docling version: 2.51.0
Docling Core version: 2.48.0
Docling IBM Models version: 3.9.1
Docling Parse version: 4.4.0

### Platform
Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.35

### Python version

Python 3.12.11

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.