How to extract text from a scanned PDF (Arabic and English)

6 min read

A scanned page looks like text but behaves like a photograph: you cannot select it, search it or copy a line out of it. Optical character recognition reads the shapes and gives you back real text. What is unusual here is that it runs on your own device, and it handles Arabic — a script most browser-based tools skip entirely.

How to tell if your PDF needs OCR

Open it and try to select a sentence with your cursor. If individual words highlight as you drag, there is already a text layer and you can simply copy what you need.

If nothing highlights, or the whole page highlights as one solid block, you are looking at an image and OCR is what you need. Another quick check: press Ctrl+F (Cmd+F on a Mac) and search for a word you can clearly see on the page. If the reader finds nothing, there is no text to find.

Running it

The first run downloads the recognition engine and the language model, a few megabytes in total. After that it is cached, so the next document starts immediately — and it keeps working with no connection at all.

  1. 1Open the OCR tool and choose your scanned PDF.
  2. 2Pick the language: Arabic, English, or both together for mixed documents.
  3. 3Press OCR and wait — roughly a few seconds per page, depending on your device.
  4. 4The text appears on the page, ready to select and copy, with a download button if you want it as a file.

Recognition is genuinely computational work. A 40-page scan will take a couple of minutes and will make your device warm. That is the cost of not sending your pages to someone else's server.

Getting better results

Recognition quality depends almost entirely on the scan. A flat, well-lit page at 300 dpi will come back close to perfect. A photo taken at an angle in poor light will not, for any OCR engine on the market — this is a property of the input, not of the software.

Source qualityWhat to expect
Flatbed scan, 300 dpi, clean printNear-perfect; a few stray characters at most
Phone photo, flat and well litVery good; occasional word needs fixing
Phone photo at an angle or in shadowPatchy; whole lines may be wrong
Fax, photocopy of a photocopyPoor; expect substantial correction
HandwritingNot supported reliably in any language

If you are photographing the page yourself

Those four habits matter more than any setting in any OCR tool. If you can only fix one thing, fix the angle: skewed text is the single most common cause of bad recognition.

  1. 1Place the page on a flat surface with good contrast — white paper on a dark desk.
  2. 2Use indirect daylight and make sure your own shadow is not falling across the text.
  3. 3Hold the phone parallel to the page and shoot straight down, not at an angle.
  4. 4Fill the frame with the document, and take the photo before cropping rather than zooming in.

What to expect from Arabic specifically

Arabic is harder for OCR than English, for reasons built into the script. Letters connect to their neighbours, so there is no clean white space between characters to segment on. Each letter changes shape depending on whether it is initial, medial, final or isolated. And dots are the only thing distinguishing otherwise identical forms — ب, ت, ث and ن differ by dots alone, so a speck of dust or a faint scan can turn one into another.

Clear printed Arabic in a standard Naskh typeface recognises well. Expect to fix the occasional word, particularly where a dot is faint in the scan or where the original print was light.

Decorative and calligraphic faces are much harder, and Nastaliq-style typefaces — common in Persian and Urdu material — are effectively unsupported by general-purpose engines. Diacritics (tashkeel) are often dropped or misread; if your source is a vocalised text, expect to restore them yourself.

Handwriting is a different problem entirely, and no general-purpose OCR handles it reliably in either language.

Mixed Arabic and English documents

Bilingual documents are ordinary in the Gulf and across the Arab world — a contract with English terms, an invoice with Latin product codes, a CV that switches script mid-line.

Select both languages together for these. Recognition is slightly slower because two models are loaded, and mixed lines are where errors concentrate, especially around numbers and Latin abbreviations embedded in Arabic sentences.

One quirk worth knowing: the reading order of a mixed line is genuinely ambiguous to software. Numbers and Latin words inside an Arabic paragraph can come out in the wrong position even when every character is recognised correctly. Check reference numbers and dates by eye.

Fixing the output efficiently

Read the result once against the original rather than proofreading blind. OCR errors are systematic, not random, so once you spot a confusion it usually repeats throughout the document — and find-and-replace fixes all of them at once.

The most common English confusions are 0/O, 1/l/I, rn/m and 5/S. In Arabic, watch for missing or extra dots, and for ه versus ة at the end of words.

Numbers deserve special attention. A misread digit in an invoice total or a reference number is far more damaging than a misread word, and it will not look wrong when you skim.

What OCR will not do for you

It recovers text, not layout. Multi-column pages usually come back as a single stream, and tables lose their structure — the cell contents survive, but the grid does not.

Stamps, signatures, handwritten annotations and logos are images, and they will either be skipped or produce nonsense characters where the engine tries to read them.

And it does not verify anything. OCR output is a best guess with no confidence attached in the text itself, which is why anything legal or financial deserves a read-through before you rely on it.

Try it now — free and private

The tool runs entirely in your browser. Your file never leaves your device.

OCR — scanned PDF to text

Common questions

Tools mentioned in this guide

Latest articles

Back to all articles