Free tools that run in your browser. Use any tool without an account.

Favourites Cart
Sign in
Join free
PDF and Documents

OCR a PDF: Fix Text, Tables, and Arabic Errors

By FreeToolr editors6 November 20268 min read
A scanned PDF page beside extracted text and a checked table with Arabic and English content

OCR can make an image-only PDF searchable, but it cannot guarantee correct text or table structure. To get a reliable result, prepare the scan, choose the right language, review key fields, and compare the output with the page image.

First, check if your PDF needs OCR

A PDF can contain native text, an image-only scan, or an image with an invisible text layer. These types need different fixes.

Try these checks:

  1. Select one word with your cursor.
  2. Copy it into a plain text editor.
  3. Search for a phrase that you can see on the page.
  4. Zoom in and check if the letters stay sharp.

If you cannot select or search any text, the PDF probably needs OCR. You can use FreeToolr's OCR PDF tool to add searchable text to a scanned file.

If you can select text but the copied result contains random letters, boxes, or reversed Arabic, the issue may be a damaged character map or reading order. Running OCR may help, but first save the original file.

A good existing text layer does not need replacement. OCR can remove useful details, including diacritics, unusual names, and carefully positioned text.

What OCR does to a scanned PDF

OCR reads letters from a page image and creates a machine-readable text layer. The original image usually remains visible, so the page can look unchanged while searches work underneath.

This text layer can help you:

  1. Search for names, dates, and reference numbers.
  2. Copy paragraphs into another document.
  3. Extract text with a PDF reader.
  4. Help screen readers identify page content.
  5. Find pages in a long scanned file.

Searchability does not prove accuracy. OCR may recognise every word well but still place a heading after a paragraph. It may also read table cells in the wrong order.

OCR quality has several separate parts:

  1. Character accuracy means letters and digits are recognised correctly.
  2. Word accuracy means spaces and words are reconstructed correctly.
  3. Reading order means columns and sections appear in the right sequence.
  4. Table structure means rows, columns, and cells stay connected.
  5. Language accuracy means the selected script and direction match the page.

A PDF can perform well in one area and poorly in another.

Advertisement

Prepare the scan before OCR

Better input usually produces fewer OCR errors. Start with the clearest available copy.

Use these settings when you can:

  1. Scan printed documents at about 300 dpi.
  2. Use grayscale for ordinary black text.
  3. Use colour when stamps, highlighting, or faint marks carry meaning.
  4. Crop dark borders and scanner edges.
  5. Straighten tilted pages.
  6. Remove speckles, shadows, and background patterns.
  7. Rotate pages so text runs in the correct direction.

Higher resolution can help very small text, but it also creates larger files. Test a difficult page before processing an entire archive.

Do not sharpen an image until letters develop rough edges. Excessive contrast can turn Arabic dots into noise or merge nearby Latin letters.

For a photocopy with a grey background, try a clean black-and-white version and a grayscale version. Compare both results on a page with small text.

A practical OCR PDF workflow

Follow this process for most printed documents.

1. Keep the original

Create a copy before OCR. Name the files clearly, such as contract-original.pdf and contract-ocr.pdf.

The original scan remains your visual source if the OCR text contains errors. This matters for contracts, invoices, identity documents, certificates, and official forms.

2. Select every language on the page

Choose Arabic for Arabic pages and add English when both languages appear. Mixed-language documents need special care because the direction can change within one line.

Also check the digit style. Arabic script may appear with Western digits, such as 2026, or Arabic-Indic digits, such as ٢٠٢٦. Persian documents may use Persian digits, such as ۲۰۲۶.

The OCR engine may copy digits correctly but place them in the wrong visual order. Check dates, phone numbers, account numbers, and amounts against the image.

3. Run OCR

Process one representative page first. Choose a page with a heading, a paragraph, a table, and any Arabic or English mixing.

Search the result for a visible phrase. Copy a short section into a plain text editor. Check spaces, punctuation, and line order.

If the sample looks acceptable, process the full PDF. If it fails, improve the scan or change the language and layout settings first.

4. Make the scanned PDF searchable

A searchable PDF lets you find text without changing the visible page. After OCR, test several words from different pages.

Search for:

  1. A heading near the top of a page.
  2. A name with unusual spelling.
  3. A number with several digits.
  4. A word in each language.
  5. Text inside a table.

If search finds only some pages, the OCR layer may be missing from selected pages. Check the output page by page.

For text-only work, FreeToolr's PDF to Text tool can help extract the recognised text. Treat the result as a draft until you compare key content with the scan.

How to fix common OCR errors

OCR errors often follow a pattern. Find the pattern before correcting every word by hand.

Letters mistaken for other letters

Poor scans can turn 0 into O, 1 into I, and 5 into S. Small fonts can also confuse rn with m.

Search for likely substitutions. Then compare each match with the image. Do not run a global replacement when the same character can be valid in another field.

Missing spaces or extra spaces

OCR may join two words or split one name. This happens near stamps, underlining, and narrow columns.

Check names, addresses, email addresses, and legal terms manually. A spell checker can find some problems, but it cannot confirm a person or company name.

Wrong reading order

Multi-column pages often extract from top to bottom instead of column by column. Text boxes, footers, side notes, and captions can also appear in the wrong place.

Read the extracted text beside the page image. If the order is wrong, use a layout-aware OCR setting or extract each column separately.

Missing punctuation

Commas, decimal points, quotation marks, and hyphens can disappear. This creates serious problems in measurements, dates, and amounts.

Check every decimal amount and every field that controls a calculation. Do not trust a total only because it looks plausible.

Extract a table from a PDF without losing meaning

OCR can recognise table characters without understanding the table. A visible four-column table may become one long line of text.

Before exporting a table, identify:

  1. The header row.
  2. The first and last row.
  3. Merged cells.
  4. Subtotals and grand totals.
  5. Blank cells that have meaning.
  6. Units such as kg, GBP, USD, EUR, or NGN.

For a simple table, copy the result into a spreadsheet and assign each value to a row and column. For complex tables, use a table-recognition feature or rebuild the table manually.

Worked example

Suppose a scanned invoice has 12 rows and 4 columns: item, quantity, unit price, and line total. The printed grand total is $1,248.50.

OCR extracts all 48 visible cells, but one item description wraps onto a second line. It also reads 8 as 3 in the quantity column.

Use this check:

  1. Count the expected 12 item rows.
  2. Check each quantity against the image.
  3. Multiply quantity by unit price for every row.
  4. Compare each calculated line total with the extracted value.
  5. Add the line totals and compare the result with $1,248.50.

If the recalculated total differs, inspect the rows with unusual quantities, decimal points, discounts, or tax. Keep the original page next to the spreadsheet.

This process checks table meaning, not only spelling. A clean-looking export can still attach a price to the wrong item.

Fix Arabic OCR PDF errors

Arabic OCR has extra challenges because Arabic is written from right to left and letters can join within a word. Dots, diacritics, ligatures, elongated characters, stamps, and mixed English text can affect recognition.

Watch for these problems:

  1. Words appear in reverse order after copying.
  2. Arabic and English segments swap places.
  3. Arabic-Indic digits move to the wrong side of a label.
  4. Dots disappear from letters such as ب, ت, and ث.
  5. Tatweel, the stretching character, appears repeatedly.
  6. Lam-alef forms copy as unusual characters.
  7. Diacritics are missing or placed on the wrong letter.
  8. Stamps are read as letters.

First decide if the error comes from OCR or the existing PDF text layer. If the page is image-only, improve the scan and run Arabic OCR. If the text is selectable but garbled, the PDF may have a faulty character map.

Unicode normalization can repair some compatibility or presentation-form characters. NFKC is one common option, but it does not fix reversed reading order or missing glyph mappings.

If copied text contains unrelated Latin letters, empty boxes, or random symbols, cleaning alone cannot reliably recover the original. Use the source document, OCR the rendered page, or retype the affected passage.

For mixed Arabic and English lines, compare the visual page with the extracted result. Check names, passport numbers, dates, addresses, and bank details one field at a time.

When not to upload a PDF

A browser OCR service may require you to upload the document to a server. Check its privacy policy, retention period, processing location, and deletion controls before uploading sensitive files.

Use extra care with identity documents, contracts, payroll records, patient records, and financial statements. Your legal duties may depend on your location and the document type.

For European users, review the GDPR requirements and your organisation's data processing terms. For US health records, check applicable HIPAA rules and your provider agreement. UK organisations should review ICO guidance for personal data processing.

A local OCR application may be a better choice for confidential material. If you use an online tool, remove unnecessary pages and redact data only with a method that permanently removes the underlying information.

Final quality check

Before sharing or relying on an OCR PDF, check these items:

  1. Search works on several pages.
  2. The visible page still matches the original.
  3. Headings and columns follow the right order.
  4. Names and reference numbers match the scan.
  5. Dates use the intended day and month order.
  6. Decimal points and currency codes are correct.
  7. Table rows and columns remain connected.
  8. Arabic words, digits, and mixed-direction lines look correct.
  9. The original file is stored separately.
  10. Sensitive data follows your organisation's privacy rules.

OCR is a useful conversion step, not a proof of accuracy. For routine documents, a careful sample check may be enough. For legal, financial, or official records, review every field that could change a decision.

Sources

  1. Adobe Acrobat: Extract key data from scanned PDFs with OCR
  2. Adobe Help: Fix text recognition errors in scanned PDFs
  3. OCRmyPDF documentation
  4. ArabicFix: Arabic text copied from a PDF
  5. ICO: Data protection guidance
  6. EUR-Lex: General Data Protection Regulation
  7. US HHS: HIPAA for professionals

Questions people ask

How do I know if a PDF needs OCR?

Try selecting words and searching for a phrase you can see. If neither works, the page is likely image-only and needs OCR.

Can OCR make a scanned PDF searchable?

Yes. OCR adds a machine-readable text layer, usually while keeping the original page image visible. Searchability does not confirm that every word or table cell is correct.

Why is Arabic text reversed after copying from a PDF?

The PDF may store Arabic glyphs, positions, and character mappings without a reliable reading order. Try OCR on the rendered page, or repair the text layer if its character mapping is damaged.

Can OCR extract a table from a PDF accurately?

OCR can recognise table text but may lose rows, columns, merged cells, or cell relationships. Check important values and totals against the original page.

What resolution should I use for OCR?

About 300 dpi is a practical starting point for printed documents. Test pages with small text or poor contrast before processing the full file.

FreeToolr articles are written and checked by our editors. Found a mistake? Email [email protected]. Read our editorial policy.

More in PDF and Documents

Help keep every tool free

FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.

Advertisement
Advertisement