New Tool Radar

OCR & Text Layers

How to Check Arabic Script in a Scanned PDF After OCR

Check whether Arabic script in a scanned PDF is recognised with the right language pack, with letters joined as they are on the page.

Schematic illustration of a scanned PDF with an Arabic passage: after OCR with ara the words highlight as joined groups and paste back as Arabic script.

Arabic letters change shape depending on their neighbours, so OCR must handle joined forms, not isolated letters. Tesseract’s manual lists ara (Arabic) and the Arabic script among its traineddata files, and the OCRmyPDF manual notes its renderer supports RTL scripts.

Use the practice file

A practice document, practice-arabic-text.pdf. The file is fictional.

Page Content
1 English title page
2 Arabic passage, 4 lines, joined script
3 English summary

Page 2 is the check page: the Arabic passage has 4 lines.

Check the Arabic passage

Expected result. We checked the Tesseract manual and the Adobe Help. We did not run any tool. The checks below are what to expect if the work is done correctly; run them yourself on the practice file.

1. List the installed languages

Run tesseract –list-langs and look for ara.

Expected result: ara is listed, so the Arabic pack is installed.

2. Run OCR with ara

Set the OCR language to ara for page 2.

Expected result: OCR processes page 2 with the Arabic model.

3. Select a word in the passage

Drag across a word on page 2.

Expected result: The word highlights as one joined group, at the right-hand end of its line.

4. Copy the passage

Copy the four lines and paste them into a text file.

Expected result: The pasted text shows Arabic script with joined letters, and the line count is 4.

Verdict table

Check Expected result Pass?
List the installed languages ara is listed, so the Arabic pack is installed. —
Run OCR with ara OCR processes page 2 with the Arabic model. —
Select a word in the passage The word highlights as one joined group, at the right-hand end of its line. —
Copy the passage The pasted text shows Arabic script with joined letters, and the line count is 4. —

Related guides: How to Pick the OCR Language for a Multilingual Scanned PDF — How to Check That Your OCR Language Pack Is Installed.

Limits

  • Arabic that pastes as isolated letters has lost its joining, which changes the words; check the shapes, not just the presence of Arabic characters.
  • The wrong language setting produces confident-looking gibberish; the language must match the page, not the reader.
  • UNTESTED — no OCR tool was run; all results above are expected results. The practice file is fictional.

Sources

See all