Which Arabic fonts give a searchable PDF?
Thirteen fonts printed to PDF by headless Chrome and read back with pdf.js. One passed.
If you build Arabic invoices, contracts, certificates or CVs as HTML and print them with Puppeteer, Playwright or any HTML-to-PDF service built on Chrome, the PDF can look perfect and still carry no usable text: copy-paste gives shaped glyph codes, a search for الموظف finds nothing, and an ATS or search index reads noise. The screen never shows the problem.
Results — Chrome 135, pdf.js 4.8, September 2026
| Font | Letters stored as | لا ligature | Words found |
|---|---|---|---|
| Amiri Regular | real Arabic letters | in order | 15 / 18 |
| Amiri Bold | real Arabic letters | in order | 16 / 18 |
| IBM Plex Sans Arabic | presentation forms | — | 0 / 18 |
| Noto Sans Arabic | presentation forms | — | 0 / 18 |
| Arial | presentation forms | — | 0 / 18 |
| Tahoma | presentation forms | — | 0 / 18 |
| Times New Roman | presentation forms | — | 0 / 18 |
| Segoe UI | presentation forms | — | 1 / 18 |
| Traditional Arabic | presentation forms | — | 0 / 18 |
| Simplified Arabic | presentation forms | — | 0 / 18 |
| Arabic Typesetting | presentation forms | — | 0 / 18 |
| Sakkal Majalla | presentation forms | — | 1 / 18 |
| Andalus | presentation forms | — | 0 / 18 |
An August 2026 round with the same method added web fonts: Readex Pro, Scheherazade New and Lateef store real letters but reverse the لا ligature (so الأمر، الآن، لإدارة are not found); Noto Naskh Arabic, Noto Kufi Arabic, Cairo, Almarai and Tajawal store presentation forms. The 2–3 words Amiri misses are an extraction artefact: pdf.js sometimes puts a space inside a word at a text-run boundary, while the letters stay complete and in order.
Why it happens
Chrome shapes Arabic with HarfBuzz and embeds the shaped glyphs. To keep the text extractable it writes a
ToUnicode map from each glyph back to the characters it came from. For most Arabic fonts that
map points at the Unicode presentation forms (U+FB50–FDFF, U+FE70–FEFF), which describe a letter's
shape rather than the letter, so the text layer is a different string from the one you typed. The
لا / لأ / لإ / لآ ligature is a single glyph for two letters, and most faces that get
the letters right still map it back as alef + lam, reversed.
Check your own font
git clone https://github.com/mahmoudQq2023/arabic-pdf-fonts cd arabic-pdf-fonts && npm install node check-font.mjs /path/to/YourFont.ttf another.otf node check-font.mjs --json fonts/*.ttf # for CI; exits 1 if any font fails
What to do
- Embed Amiri (SIL Open Font License) for Arabic text that must stay searchable, with a real Bold file: a synthetic bold can split a heading into one text run per letter.
- Do not promise copyable harakat. Diacritics render in every face and extracted as U+0000 in all of them.
- Test the PDF, not the page. Search the output for a word containing لا before shipping a template.
If you only need the result: Confileo's text to PDF converter embeds Amiri for exactly this reason (Arabic interface: تحويل النص إلى PDF).