pdfTeX bitmap (Type3) fonts are decoded as Zapf Dingbats: "Docling parses" becomes "❉♦❝❧✐♥❣ ♣❛a114a115❡a115"
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start by reading the Type3 font encoding logic and the glyph tables, especially glyphs/standard/zapfdingbats.dat; the issue describes how /Differences names such as /a76 are interpreted. Compare the existing whole-vector check for G<decimal> names with pdfTeX’s /a<decimal> convention, then run the proposed failing unit test. Done means Type3 pdfTeX bitmap fonts extract the original text while Zapf Dingbats fonts keep their glyph mapping.
Written by the indexing model from the issue text.
Description
When pdfLaTeX cannot find a Type 1 version of a font, it embeds the TeX bitmap (PK) font as a Type3 font. This happens, for example, with \usepackage[T1]{fontenc} on a TeX installation without cm-super (a minimal TinyTeX install is one). pdfTeX names each glyph after its own decimal character code (/Differences [44 /a44 46 /a46 68 /a68 ...]) and writes no /ToUnicode.
docling-parse looks these names up in the glyph tables, and /a1 ... /a191 are in the ITC Zapf Dingbats list (glyphs/standard/zapfdingbats.dat), which is loaded for every font. So /a76 (code 76, "L") becomes U+25B2 "▲", /a101 ("e") becomes "❡", and so on. Names with no dingbat entry (/a114, /a115, /a116) are kept as literal text. A whole page of text comes out as dingbats.
Reproduction (t1.tex, pdfTeX 3.141592653-2.6-1.40.29, TeX Live 2026, no cm-super):
\documentclass{article}
\usepackage[T1]{fontenc}
\pagestyle{empty}
\begin{document}
Docling parses this sentence, typeset by pdfLaTeX in a bitmap font.
\end{document}
from docling_parse.pdf_parser import DoclingPdfParser
doc = DoclingPdfParser(loglevel="fatal").load("t1.pdf")
print([c.text for c in doc.get_page(1).textline_cells])
| Extractor | Text |
|---|---|
| docling-parse 7.26.0 | ❉♦❝❧✐♥❣ ♣❛a114a115❡a115 a116❤✐a115 a115❡♥a116❡♥❝❡✱ a116②♣❡a115❡a116 ❜② ♣❞❢▲❛❚❡❳ ✐♥ ❛ ❜✐a116♠❛♣ ❢♦♥a116✳ |
| pypdfium2 5.15.2 (PDFium) | Docling parses this sentence, typeset by pdfLaTeX in a bitmap font. |
| pdfminer.six 20260107 | Docling parses this sentence, typeset by pdfLaTeX in a bitmap font. |
| pypdf 7.1.0 | Docling parses this sentence, typeset by pdfLaTeX in a bitmap font. |
A Type3 font with the same glyphs and an empty /Differences vector (or no /Encoding) already extracts correctly, so the base-encoding fallback works. Only the glyph-name lookup gets in the way.
The Zapf Dingbats names only mean dingbats in the ZapfDingbats font. A /Differences vector in which every name is /a<n> at code n (or .notdef), in a Type3 font, is pdfTeX's convention. That is the same kind of whole-vector check the parser already does for the G<decimal> names. A synthetic one-glyph-per-code font reproduces it too (Let and. comes out as ▲❡a116✥❛♥❞✳).
I have a small fix and a unit test that fails on main. I can open a pull request, and a regression-dataset pull request with the pdfLaTeX document, if this approach is acceptable.
This issue was drafted with Claude Code (claude-opus-5-5); the results above are from the runs described.
- Dominant language
- C++
- Stars
- 352
- Forks
- 99
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 37
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docling-project/docling-parse
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
docling-project/docling-parse#448 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
docling-project/docling-parse#492 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
docling-project/docling-parse#487 ·
Maintainers usually reply within 1 day
-
7.25.0 splits letter-spaced CJK runs of two to four characters into one word per character (`股本重組` -> `股 本 重 組`): `infer_unspaced_gap_profile()` needs four gaps before it sees trackingPossibly taken @jjohnnystwsss claimed this 4 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
docling-project/docling-parse#483 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
docling-project/docling-parse#482 ·
Maintainers usually reply within 1 day
All issues in docling-project/docling-parse
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Maintainers usually reply within 2 days
-
Missing repro Platform: Android
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
software-mansion/react-native-reanimated#11554 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Niko1221/Strata#7211 · 3 comments ·
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
sleepyviper1213/redis#52 ·