Skip to content
Use case

Converting an Arabic (right-to-left) PDF to EPUB

Updated:

Arabic PDFs often store letters in visual order, so converters that read them left to right reverse the words. On an Arabic Wikipedia article the EPUBLab engine restores the word order and writes a right-to-left EPUB.

Original and result

Right-to-left script stored in visual order, joined letter forms and combining marks.

Original PDF
Page of the original PDF
Result (EPUB, as a reader shows it)
The same passage in the converted EPUB

Download source PDF Download the sample EPUB

Source and licence

Document
Wikipedia (Arabic): One Thousand and One Nights
Licence
CC BY-SA 4.0 (text); images under their own licences
Pages
17
Traits
text PDF, one column, Arabic, right-to-left

Settings used

  • Engine: epublab-core, build of 2026-11-03 (the one measured in the benchmark).
  • Pages: the whole document.
  • Options: none. The engine has no per-document settings yet; the same defaults apply to every file.

Validation and results

EPUBCheck EPUBCheck on our EPUB: 0 errors, 0 warnings.

8-gram recall · Like 4-gram recall with 8 words: drops when reading order or line joins break sentences (continuity). Methodology
Engine8-gram recall
EPUBLab engine (EPUB output)0.673
EPUBLab engine (plain text)0.674
pdf_oxide · extract_text0.315
pdf_oxide · to_plain_text (XY-cut)0.315
pdf_oxide · Markdown0.273
PDFium · text().all()0.001
OpenDataLoader PDF (local mode)0.000
pdftotext (Poppler)0.659

Limitations we observed

  • Mixed right-to-left and left-to-right runs (numbers, Latin names) inside a line may need review.
  • Wikipedia references leave out tables and infoboxes, so precision is low for every engine.

Convert a similar PDF