Dataset Viewer
Auto-converted to Parquet Duplicate
case
stringclasses
5 values
text
stringclasses
5 values
generator
stringclasses
4 values
extractor
stringclasses
3 values
extracted
stringlengths
4
41
order_ok
bool
2 classes
chars_ok
bool
2 classes
verdict
stringclasses
4 values
greeting
مرحبا بكم في دولة الإمارات
chrome (HTML->PDF)
pypdf
مرحبا بكم في دولة الإمارات
true
true
clean
greeting
مرحبا بكم في دولة الإمارات
chrome (HTML->PDF)
pdfminer.six
تاراملإا ةلود يف مكب ابحرم
false
true
ligature
greeting
مرحبا بكم في دولة الإمارات
chrome (HTML->PDF)
poppler pdftotext
‫مرحبا بكم في دولة اإلمارات‬
false
true
ligature
greeting
مرحبا بكم في دولة الإمارات
reportlab (naive)
pypdf
تارامإلا ةلود يف مكب ابحرم
false
true
reversed
greeting
مرحبا بكم في دولة الإمارات
reportlab (naive)
pdfminer.six
مرحبا بكم في دولة الإمارات
true
true
clean
greeting
مرحبا بكم في دولة الإمارات
reportlab (naive)
poppler pdftotext
‫تارامإلا ةلود يف مكب ابحرم‬
false
true
reversed
greeting
مرحبا بكم في دولة الإمارات
reportlab (+reshaper)
pypdf
ﻣﺮﺣﺒﺎ ﺑﻜﻢ ﻓﻲ ﺩﻭﻟﺔ ﺍﻹﻣﺎﺭﺍﺕ
true
true
clean
greeting
مرحبا بكم في دولة الإمارات
reportlab (+reshaper)
pdfminer.six
ﺕﺍﺭﺎﻣﻹﺍ ﺔﻟﻭﺩ ﻲﻓ ﻢﻜﺑ ﺎﺒﺣﺮﻣ
false
true
ligature
greeting
مرحبا بكم في دولة الإمارات
reportlab (+reshaper)
poppler pdftotext
‫ﻣﺮﺣﺒﺎ ﺑﻜﻢ ﻓﻲ ﺩﻭﻟﺔ ﺍﻹﻣﺎﺭﺍﺕ‬
true
true
clean
greeting
مرحبا بكم في دولة الإمارات
libreoffice (.docx)
pypdf
مرحبا بكم في دولة الإمارات
true
true
clean
greeting
مرحبا بكم في دولة الإمارات
libreoffice (.docx)
pdfminer.six
تاراملإا ةلود يف مكب ابحرم
false
true
ligature
greeting
مرحبا بكم في دولة الإمارات
libreoffice (.docx)
poppler pdftotext
‫مرحبا بكم في دولة اإلمارات‬
false
true
ligature
tender
التزامنا بالنزاهة والشفافية
chrome (HTML->PDF)
pypdf
التزامنا بالنزاهة والشفافية
true
true
clean
tender
التزامنا بالنزاهة والشفافية
chrome (HTML->PDF)
pdfminer.six
ةيفافشلاو ةهازنلاب انمازتلا
false
true
reversed
tender
التزامنا بالنزاهة والشفافية
chrome (HTML->PDF)
poppler pdftotext
‫التزامنا بالنزاهة والشفافية‬
true
true
clean
tender
التزامنا بالنزاهة والشفافية
reportlab (naive)
pypdf
ةيفافشلاو ةهازنلاب انمازتلا
false
true
reversed
tender
التزامنا بالنزاهة والشفافية
reportlab (naive)
pdfminer.six
التزامنا بالنزاهة والشفافية
true
true
clean
tender
التزامنا بالنزاهة والشفافية
reportlab (naive)
poppler pdftotext
‫ةيفافشلاو ةهازنلاب انمازتلا‬
false
true
reversed
tender
التزامنا بالنزاهة والشفافية
reportlab (+reshaper)
pypdf
ﺍﻟﺘﺰﺍﻣﻨﺎ ﺑﺎﻟﻨﺰﺍﻫﺔ ﻭﺍﻟﺸﻔﺎﻓﻴﺔ
true
true
clean
tender
التزامنا بالنزاهة والشفافية
reportlab (+reshaper)
pdfminer.six
ﺔﻴﻓﺎﻔﺸﻟﺍﻭ ﺔﻫﺍﺰﻨﻟﺎﺑ ﺎﻨﻣﺍﺰﺘﻟﺍ
false
true
reversed
tender
التزامنا بالنزاهة والشفافية
reportlab (+reshaper)
poppler pdftotext
‫ﺍﻟﺘﺰﺍﻣﻨﺎ ﺑﺎﻟﻨﺰﺍﻫﺔ ﻭﺍﻟﺸﻔﺎﻓﻴﺔ‬
true
true
clean
tender
التزامنا بالنزاهة والشفافية
libreoffice (.docx)
pypdf
التزامنا بالنزاهة والشفافية
true
true
clean
tender
التزامنا بالنزاهة والشفافية
libreoffice (.docx)
pdfminer.six
ةيفافشلاو ةهازنلاب انمازتلا
false
true
reversed
tender
التزامنا بالنزاهة والشفافية
libreoffice (.docx)
poppler pdftotext
‫التزامنا بالنزاهة والشفافية‬
true
true
clean
with_digits
في عام 2026 بلغت النسبة 47 بالمئة
chrome (HTML->PDF)
pypdf
بالمئة47 بلغت النسبة2026في عام
false
true
ligature
with_digits
في عام 2026 بلغت النسبة 47 بالمئة
chrome (HTML->PDF)
pdfminer.six
ةئلماب 47 ةبسنلا تغلب 2026 ماع يف
false
true
ligature
with_digits
في عام 2026 بلغت النسبة 47 بالمئة
chrome (HTML->PDF)
poppler pdftotext
‫في عام ‪ 2026‬بلغت النسبة ‪ 47‬باملئة‬
false
true
ligature
with_digits
في عام 2026 بلغت النسبة 47 بالمئة
reportlab (naive)
pypdf
ةئملاب
false
false
mangled
with_digits
في عام 2026 بلغت النسبة 47 بالمئة
reportlab (naive)
pdfminer.six
في عام 2026 بلغت النسبة 47 بالمئة
true
true
clean
with_digits
في عام 2026 بلغت النسبة 47 بالمئة
reportlab (naive)
poppler pdftotext
‫ةئملاب ‪ 47‬ةبسنلا تغلب ‪ 2026‬ماع يف‬
false
true
ligature
with_digits
في عام 2026 بلغت النسبة 47 بالمئة
reportlab (+reshaper)
pypdf
ﻓﻲ ﻋﺎﻡ
false
false
mangled
with_digits
في عام 2026 بلغت النسبة 47 بالمئة
reportlab (+reshaper)
pdfminer.six
ﺔﺌﻤﻟﺎﺑ 47 ﺔﺒﺴﻨﻟﺍ ﺖﻐﻠﺑ 2026 ﻡﺎﻋ ﻲﻓ
false
true
ligature
with_digits
في عام 2026 بلغت النسبة 47 بالمئة
reportlab (+reshaper)
poppler pdftotext
‫ﻓﻲ ﻋﺎﻡ ‪ 2026‬ﺑﻠﻐﺖ ﺍﻟﻨﺴﺒﺔ ‪ 47‬ﺑﺎﻟﻤﺌﺔ‬
false
true
ligature
with_digits
في عام 2026 بلغت النسبة 47 بالمئة
libreoffice (.docx)
pypdf
في عام2026 بلغت النسبة47 بالمئة
true
true
clean
with_digits
في عام 2026 بلغت النسبة 47 بالمئة
libreoffice (.docx)
pdfminer.six
ةئملاب 47 ةبسنلا تغلب 2026 ماع يف
false
true
ligature
with_digits
في عام 2026 بلغت النسبة 47 بالمئة
libreoffice (.docx)
poppler pdftotext
‫في عام ‪ 2026‬بلغت النسبة ‪ 47‬بالمئة‬
false
true
ligature
mixed
شركة Pixelogik للإنتاج الإعلامي
chrome (HTML->PDF)
pypdf
للإنتاج الإعلاميPixelogikشركة
false
true
ligature
mixed
شركة Pixelogik للإنتاج الإعلامي
chrome (HTML->PDF)
pdfminer.six
يملاعلإا جاتنلإل Pixelogik ةكرش
false
true
ligature
mixed
شركة Pixelogik للإنتاج الإعلامي
chrome (HTML->PDF)
poppler pdftotext
‫شركة ‪ Pixelogik‬لإلنتاج اإلعالمي‬
false
true
ligature
mixed
شركة Pixelogik للإنتاج الإعلامي
reportlab (naive)
pypdf
يمالعإلا جاتنإلل
false
false
mangled
mixed
شركة Pixelogik للإنتاج الإعلامي
reportlab (naive)
pdfminer.six
شركة Pixelogik للإنتاج الإعلامي
true
true
clean
mixed
شركة Pixelogik للإنتاج الإعلامي
reportlab (naive)
poppler pdftotext
‫يمالعإلا جاتنإلل ‪ Pixelogik‬ةكرش‬
false
true
ligature
mixed
شركة Pixelogik للإنتاج الإعلامي
reportlab (+reshaper)
pypdf
ﺷﺮﻛﺔ
false
false
mangled
mixed
شركة Pixelogik للإنتاج الإعلامي
reportlab (+reshaper)
pdfminer.six
ﻲﻣﻼﻋﻹﺍ ﺝﺎﺘﻧﻺﻟ Pixelogik ﺔﻛﺮﺷ
false
true
ligature
mixed
شركة Pixelogik للإنتاج الإعلامي
reportlab (+reshaper)
poppler pdftotext
‫ﺷﺮﻛﺔ ‪ Pixelogik‬ﻟﻺﻧﺘﺎﺝ ﺍﻹﻋﻼﻣﻲ‬
false
true
ligature
mixed
شركة Pixelogik للإنتاج الإعلامي
libreoffice (.docx)
pypdf
شركةPixelogik للإنتاج الإعلامي
true
true
clean
mixed
شركة Pixelogik للإنتاج الإعلامي
libreoffice (.docx)
pdfminer.six
يملاعلإا جاتنلإل Pixelogik ةكرش
false
true
ligature
mixed
شركة Pixelogik للإنتاج الإعلامي
libreoffice (.docx)
poppler pdftotext
‫شركة ‪ Pixelogik‬لإلنتاج اإلعالمي‬
false
true
ligature
name
سعادة نبيل المهيري
chrome (HTML->PDF)
pypdf
سعادة نبيل المهيري
true
true
clean
name
سعادة نبيل المهيري
chrome (HTML->PDF)
pdfminer.six
يريهلما ليبن ةداعس
false
true
ligature
name
سعادة نبيل المهيري
chrome (HTML->PDF)
poppler pdftotext
‫سعادة نبيل املهيري‬
false
true
ligature
name
سعادة نبيل المهيري
reportlab (naive)
pypdf
يريهملا ليبن ةداعس
false
true
reversed
name
سعادة نبيل المهيري
reportlab (naive)
pdfminer.six
سعادة نبيل المهيري
true
true
clean
name
سعادة نبيل المهيري
reportlab (naive)
poppler pdftotext
‫يريهملا ليبن ةداعس‬
false
true
reversed
name
سعادة نبيل المهيري
reportlab (+reshaper)
pypdf
ﺳﻌﺎﺩﺓ ﻧﺒﻴﻞ ﺍﻟﻤﻬﻴﺮﻱ
true
true
clean
name
سعادة نبيل المهيري
reportlab (+reshaper)
pdfminer.six
ﻱﺮﻴﻬﻤﻟﺍ ﻞﻴﺒﻧ ﺓﺩﺎﻌﺳ
false
true
reversed
name
سعادة نبيل المهيري
reportlab (+reshaper)
poppler pdftotext
‫ﺳﻌﺎﺩﺓ ﻧﺒﻴﻞ ﺍﻟﻤﻬﻴﺮﻱ‬
true
true
clean
name
سعادة نبيل المهيري
libreoffice (.docx)
pypdf
سعادة نبيل المهيري
true
true
clean
name
سعادة نبيل المهيري
libreoffice (.docx)
pdfminer.six
يريهملا ليبن ةداعس
false
true
reversed
name
سعادة نبيل المهيري
libreoffice (.docx)
poppler pdftotext
‫سعادة نبيل المهيري‬
true
true
clean

ArPDF — does Arabic survive a PDF?

Author: Syamjith NK Write-up: Your Arabic PDF is fine. What reads it is not. Third in a series with ArNum-TTS (speech) and ArShape (screen rendering).

The finding

No PDF generator and extractor pair reads Arabic reliably, and correctness depends on the pair rather than on either tool.

5 Arabic strings × 4 generators × 3 extractors. Clean extractions out of 5:

generator pypdf pdfminer.six poppler pdftotext
Chrome (HTML → PDF) 3/5 0/5 1/5
ReportLab (naive) 0/5 5/5 0/5
ReportLab (+ reshaper) 3/5 0/5 3/5
LibreOffice (.docx → PDF) 5/5 0/5 2/5

Re-measured on 9 October 2026, with every tool version recorded in versions.json. The table is identical, cell for cell, to the first run of 19 August 2026 (see Corrections):

version
macOS (arm64) 27.0.1
Chrome 154.0.8037.99
LibreOffice 26.8.1.1
pypdf 6.19.0
pdfminer.six 20260107
poppler pdftotext 26.09.0
reportlab 5.0.1
arabic_reshaper / python-bidi 3.0.1 / 0.6.11
python-docx (builds the .docx inputs) 1.2.0

Why pdfminer inverts

pdfminer is 0/5 against three generators and 5/5 against exactly one — the only one that performs no text layout. That is not a coincidence, and it explains the whole table.

ReportLab-naive writes the characters into the PDF in logical order, because it does no shaping or bidi. Chrome, LibreOffice and reshaped ReportLab all lay the line out visually first, so the PDF stores glyphs in visual order. pdfminer returns what is stored without re-applying bidi, so it is right precisely when the generator was naive. pypdf and poppler apply their own reordering heuristics, which is why they land in between.

So the question a PDF answers is not "is the Arabic correct" but "which order is it stored in, and does this reader re-apply bidi". No tool tells you either.

The two ends invert. ReportLab-naive extracts perfectly through pdfminer and fails every other reader; Chrome — the route most web tooling uses — is 0 for 5 through pdfminer, which is what many document pipelines run.

So you cannot choose a "good" PDF library or a "good" extractor. A document that survives one reader is unreadable to the next, and when you submit a PDF you do not control which reader is on the other side.

Why it matters

A PDF looks correct, so it is trusted. But almost nothing that consumes one looks at it — procurement portals parse the text, search engines index it, compliance tools scan for terms, applicant systems read CVs. All of them extract.

An Arabic tender response that renders perfectly on screen and extracts as reversed text is, to the system reading it, gibberish. Nobody involved sees the failure.

Three distinct failure modes

Counted separately, because they need different fixes and have very different blast radii.

mode what happens example
reversed the whole string comes back in visual order, so it reads backwards source مرحبا بكم في دولة الإمارات
extracted تاراملإا ةلود يف مكب ابحرم
ligature the lam-alef (لا) is one glyph in the PDF and returns as two letters in the wrong order source الإمارات
extracted اإلمارات
spacing letters intact, word and number boundaries lost extracted النسبة2026في

Observed across the 60-row matrix: 22 clean, 23 ligature, 11 reversed, 4 mangled.

Correction, 21 August 2026. This line previously read "9 reversed, 17 ligature, 4 mangled". Those figures were wrong: they summed to 30 rows when the matrix has 38 non-clean results, and they under-counted both reversed and ligature. The corrected counts above are recomputed directly from results.jsonl and can be reproduced with:

import json, collections
collections.Counter(json.loads(l)["verdict"] for l in open("results.jsonl"))

The direction of the finding is unchanged — ligature remains the most common failure mode and the most dangerous, because it survives a human proofread. Only the counts were wrong.

The ligature mode is the dangerous one. It is subtle enough to survive a human proofread — a reader skims past اإلمارات — while still breaking exact-match search, keyword compliance checks and any automated comparison.

Detecting it after the fact

This benchmark measures extraction. The corruption it produces usually does not stay in a terminal — it gets written to a JSON export, a search index, a database column. At that point it is at rest, and every later reader inherits it.

arabic-lint finds it:

pip install arabic-lint
arabic-lint results.jsonl
# 21 corrupted span(s) in 1 file(s); 5 cannot be auto-fixed safely.

That is this dataset's own results.jsonl — the tool flags exactly what the benchmark recorded, which is the check that it works on real data rather than fixtures.

The 5 unsafe spans are the ligature mode above. NFKC + reverse undoes the corruption exactly, except across a lam-alef: one codepoint decomposes to two in logical order inside visual-order text, so the pair comes back swapped. الإمارات recovers as اإلمارات and السلام as السالم — a real but different word. The tool therefore reports and never rewrites. Source: Syamjith-NK/arabic-lint.

What this does NOT cover

Stated plainly, because it is the obvious next question:

  • Microsoft Word itself, InDesign and LaTeX are untested. LibreOffice covers the .docx route because it is the dominant headless converter, but it is a different engine from Word and may lay text out differently. InDesign and LaTeX are not installed here, and WeasyPrint could not run (it needs Pango).
  • One font (system Arabic) and one page layout. Embedded subsets and CID fonts may behave differently.
  • Extraction only. It says nothing about whether the PDF renders correctly — it does.
  • Arabic-Indic digits are not exercised. All five cases use Western digits (2026, 47), so nothing here measures how any extractor handles ٠–٩. That is a separate pypdf bug, and one I reported and fixed: pypdf classified U+0660–U+0669 as right-to-left, so each digit was prepended and ١٢٣٤ extracted as ٤٣٢١. PR #4077 was merged on 14 September 2026 and released in pypdf 6.19.0 (16 September), the version the 9 October re-run used. The table is unaffected either way, because no row in results.jsonl contains an Arabic-Indic digit.

Reproduce

macOS with Google Chrome and LibreOffice in /Applications, and poppler's pdftotext on PATH:

pip install pypdf pdfminer.six reportlab arabic_reshaper python-bidi python-docx
python make_docx.py        # builds docx/<case>.docx: one RTL paragraph, SF Arabic 22 pt
python pdf_bench.py        # writes results.jsonl
python record_versions.py  # writes versions.json

Writes every generator × extractor combination to results.jsonl with the extracted text for each, so the failure modes can be inspected rather than taken on trust. Delete out/ first for a clean run; existing PDFs there are reused.

Corrections

9 October 2026: full re-run, test string replaced. The name case used a real person's name. It is now a neutral placeholder, سعادة نبيل المهيري, chosen to keep the typographic shape of the original: the same honorific, a four-letter first name that joins throughout, and an ال family name with no lam-alef ligature, a joining run broken by ر, and a final ي. Because the extracted text is measured, the whole matrix was re-run rather than edited:

  • The .docx inputs were rebuilt by the new make_docx.py, because the originals were not kept. The first run's tool versions were not recorded; this run's are in versions.json.
  • All 60 verdicts are unchanged, including the 12 name rows. The table and the failure-mode counts (22 clean, 23 ligature, 11 reversed, 4 mangled) are identical.
  • Three rows changed their extracted text without changing their verdict, all for mixed × LibreOffice. pypdf now drops the space before Pixelogik (still clean, because the comparison ignores whitespace). pdfminer.six and poppler return the same ligature-mode text with the segments split or ordered differently. The likely causes are the rebuilt .docx and the newer LibreOffice and extractors; this run cannot separate them.

Does Arabic Survive the Pipeline?

This is one of three reproducible benchmarks, one per stage of a real production pipeline. Each measures an Arabic failure that looks correct to anyone who does not read Arabic — which is exactly why it ships.

  • ArNum-TTS — do numbers survive speech synthesis?
  • ArShape — does the standard reshaping recipe survive rendering?
  • ArPDF — does Arabic survive a PDF round trip? ← you are here

All three are CC BY 4.0 and ship the scorer, the raw per-item results, and an explicit statement of what the measurement does not establish. Code is MIT (see LICENSE).

Related

This benchmark measures one failure in isolation. syamjithnk/arabic-corpus-audit reports a scan of 341 public Arabic datasets on the Hub, of which 276 were readable, covering 119,517 text fields. A follow-up check of one OCR dataset found stored Arabic presentation forms in all 1,000 sampled labels; this is a sample finding, not a claim that every label is corrupted. The checked labels remain in logical word order, and NFKC normalization recovered ordinary Arabic text in that sample. Presentation-form detection alone does not establish reversed word order or incorrect transcription. See the audit card's correction log for the evidence.

11 October 2026 — wording correction: the earlier summary called the OCR dataset "100% corrupted". The text above replaces that overstatement with the measured sample result and distinguishes stored glyph forms from word order. No benchmark records or scores changed.

It is archived on Zenodo and citable: doi.org/10.5281/zenodo.22733934 for the version described above, or 10.5281/zenodo.22733933 to cite every version.

Sibling benchmarks: arshape (rendering), arnum-tts (speech), arpdf (extraction). The tool: arabic-lint.

Citation

@misc{syamjithnk_arpdf_2026,
  author       = {Syamjith NK},
  title        = {ArPDF: Arabic survival through PDF generation and extraction},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/datasets/syamjithnk/arpdf}},
  note         = {Data CC BY 4.0; code MIT}
}
Downloads last month
130

Collection including syamjithnk/arpdf