Same Arabic invoice. Five PDF engines.
Counts below come from verify-textlayer.py (pypdf) — the same script wired into ArabDoc CI.
Pass requires zero presentation forms and non-zero base Arabic.
Be fair: with a real Arabic font, some libraries (e.g. react-pdf, DomPDF) can pass that numeric check
and still mangle shaping, table direction, or copy order — use the screenshots and paste samples.
jsPDF + reshaper often scores 0/0 (no real Arabic in the text layer at all).
Text layer (the part PNG review cannot see)
| Engine | Base Arabic | Presentation forms | Verdict |
|---|---|---|---|
| jsPDF + arabic-reshaper + bidi-js | 0 | 0 | fail |
| @react-pdf/renderer (direction: rtl) | 199 | 0 | pass |
| pdfmake + Noto Naskh Arabic | 0 | 0 | fail |
| DomPDF (PHP, DejaVu, dir=rtl) | 165 | 0 | pass |
| ArabDoc (Chromium + ToUnicode NFKC) | 535 | 0 | pass |
What the correct line should be
Paste each engine’s sample below into a text editor. Presentation-form garbage and reversed word order show up immediately.
Zoomed failure crops
Same regions, 2× screenshots — failures should be obvious without zooming the full page.
Ligatures / letter joining
Header + seller name. Detached glyphs vs joined Naskh/Sans shaping.
Table column order
Line-item table. First logical column should be rightmost in RTL.
Latin isolation
IDs, emails, iPad 11", +12.4% — must not jump to the wrong side.
Side by side
@react-pdf/renderer (direction: rtl)
pdfmake + Noto Naskh Arabic
DomPDF (PHP, DejaVu, dir=rtl)
ArabDoc (Chromium + ToUnicode NFKC)
Reproduce
git clone https://github.com/aleid1/arabdoc.git cd arabdoc/benchmark npm install # optional: source ../.env.deploy # for live ArabDoc Cloud Run npm run benchmark # opens numbers in out/results.json and regenerates this page under ../site/compare/
Generated 2026-08-08T07:13:42.669Z · payload benchmark/payload.json




