Time needed
120 minutes · 8 steps
What it takes
Software to install
What it costs
A free path exists
Last checked
2026-09-01

The steps

Only approved or redacted sensitive material
  • Legal work and accountability
  • Human rights activist
  • Researcher or analyst
  • Following legislation, courts and gazettes
  • Monitoring news and social media at scale
  • Making sense of large document sets
  • Research
  • Verifying images, video and claims
  • Protecting sensitive information
These are instructions, not case studies

A recipe tells you what to do. It is not a report of something that already happened somewhere else. Nothing here claims that any organisation did this. It is written for you to do now, and every step tells you how to check it worked.

What you will make

A searchable working copy of scanned legal documents, plus a finding log that points back to the exact source page. The searchable text is a navigation aid. It is not a legal record and it does not replace reading the scan.

Use public or synthetic documents during the workshop. Keep the original files unchanged.

Choose the data lane first

  • Public: Published laws, gazettes, and judgments can use an approved hosted service only after you check the pages for information about living people.
  • Internal: Unpublished analysis, draft filings, or restricted archives stay in an organisation-approved account or on a managed device.
  • Identifiable: Client files, testimony, case details, protected locations, and combinations that could identify a person stay local or are handled manually.

A public document can still contain identifiable data. Classify the contents, not only the document label.

Workshop route

  1. Count the documents and pages, then record their filenames and source.
  2. Test one representative page with OCR that fits the data lane. offers a local route.
  3. Compare the OCR text with the page before processing the full set.
  4. Search for one narrow question and save the page reference, not only the extracted words.
  5. Open every cited page and read the original before using the finding.

Five checks before you finish

  1. Data: Did any page move into a higher-risk lane because it names or describes a person?
  2. Input: Do file names, page counts, language, and scan order match the inventory?
  3. Output: Does each result include a page reference, and does the wording match the scan?
  4. Human: Has a person with the right legal and language knowledge reviewed the passage in context?
  5. Record: Did you save the source, version, search terms, date, tool, and reviewer?

Stop and change route when

Stop if handwriting, damaged scans, mixed page order, or unsupported script produces unreliable text. Do not repair missing words by guessing. Use manual transcription or a qualified reviewer when the OCR cannot be verified.

What happens to your information

Never use this for

Do not use OCR text or an AI answer as a legal conclusion, authoritative quotation or source citation without opening the original page.

What leaves your device

Whose law it lands under · The fully offline option

Nothing leaves during local OCR when software is installed and the device is offline. A hosted OCR, Gemini, NotebookLM or Drive route receives the uploaded document under current terms.

Whose law it lands under

Local processing stays under device and organisation controls. Hosted processing adds the provider and account jurisdiction.

The fully offline option

Use OCRmyPDF with Tesseract Arabic data, create sidecar text, search locally and verify every result against the scan.

What it costs

Paying for this from Iraq

The local route needs no subscription. Hosted availability and payment are separate checks.

The free path

If you pay

Tesseract and OCRmyPDF provide a free local route. Hosted tools may offer free access for public documents, but limits and terms change.

If you pay

No paid plan is required for local OCR. Check current provider pages before hosted search or OCR.

Before you start

  • A page inventory and unchanged source copy of every PDF.
  • A public or synthetic sample for the workshop.
  • A managed device with space for searchable copies and sidecar text.
  • A reviewer with the required Arabic and legal knowledge.

Which machines this works on

OCR installation differs by platform. Follow current OCRmyPDF guidance. Windows users need additional documented dependencies. Test one page before processing the archive.

The steps

  1. Step 1 / 8

    Inventory filenames, sources, page counts, language and data lane. A public document that identifies a living person moves to the identifiable route.

    Check it worked

    Every file has a source and page count, and hosted candidates contain no restricted or identifiable material.

  2. Step 2 / 8

    Keep originals read-only and make a working folder outside cloud sync. Name one representative difficult PDF test.pdf.

    Check it worked

    The source file size or checksum is recorded, the original opens, and edits happen only to a copy.

  3. Step 3 / 8

    Install OCRmyPDF, Tesseract and Arabic language data using the current official installation guidance for the platform. Windows has additional dependencies, so stop if one cannot be verified.

    Copy this exactly

    ocrmypdf --version
    tesseract --version
    tesseract --list-langs

    Check it worked

    The terminal reports versions for OCRmyPDF and Tesseract, and the language list includes ara.

  4. Step 4 / 8

    Run local OCR on test.pdf and create both a searchable PDF and a sidecar text file. Use skip-text so pages that already contain text are not forced through OCR again.

    Copy this exactly

    ocrmypdf -l ara --skip-text --deskew --rotate-pages --sidecar test.txt test.pdf test-searchable.pdf

    Check it worked

    test-searchable.pdf opens, test.txt is not empty, and output page count equals input page count.

  5. Step 5 / 8

    Check passages near the start, middle and end. Search one visible Arabic phrase, then compare the returned text and page with the scan.

    Check it worked

    All three checks point to the correct page and preserve names, numbers and negation. Otherwise change route.

  6. Step 6 / 8

    Process the remaining documents only after the sample passes. Keep one sidecar text file per PDF and record failed or unusually short outputs.

    Check it worked

    Input and output counts match, page counts match, and failures are listed rather than hidden.

  7. Step 7 / 8

    Search a narrow question locally. For public documents only, an approved hosted notebook may help navigate the set, but require document name, page number and original Arabic support for each answer.

    Copy this exactly

    Answer only from the supplied documents. For each finding give the document name, page number and exact Arabic passage. Mark uncertainty. Do not create a citation.

    Check it worked

    Every finding in the log includes a source file and page. No answer exists only in a chatbot window.

  8. Step 8 / 8

    Open every cited page and read the original in context. Record source, version, search terms, tool, date, reviewer and final interpretation, then delete working text under the retention rule.

    Check it worked

    A qualified reviewer can reproduce each finding from the unchanged scan without relying on OCR text or model prose.

How to know the whole thing worked

Choose three logged findings. Each must lead to the correct original page, preserve exact wording and numbers, and carry a human interpretation separate from machine output.

What goes wrong, and what to do about it

  • OCR output is empty or short. Check language data, page type and a one-page output.
  • Page count or order changes. Reject the output and return to the unchanged source.
  • Handwriting or damaged text cannot be verified. Transcribe manually and mark uncertainty.
  • A hosted answer cites the wrong page or invents authority. Delete the claim and verify from source.

How well it works in your language

Arabic (Modern Standard) · Iraqi Arabic · Kurdish (Sorani)

Arabic (Modern Standard)

Printed Arabic can become searchable on clear scans, but errors in words, digits and page order require page review.

Iraqi Arabic

OCR reads script, not dialect reliably. Treat handwriting and colloquial annotations as manual-review material.

Kurdish (Sorani)

Do not assume Arabic OCR data supports Sorani. If the engine lacks a tested Sorani model for the documents, transcribe manually.

What that rests on

Tesseract lists maintained language files and OCRmyPDF documents sidecar and deskew options. Neither proves accuracy on Iraqi gazette scans.

Software named in this recipe

  • OCRmyPDF
  • Tesseract
  • Google Gemini
  • NotebookLM
  • A PDF reader

Sources

A CDR original, written for POINT Conference Iraq 7. Checked against vendor pages and package registries in August 2026; the sources are listed on this page.

What we could not verify

This workflow was not benchmarked on Iraqi legal archives. Scan quality, handwriting, tables, mixed scripts, stamps and rotation can defeat OCR. Tesseract Arabic support does not establish Sorani support. Hosted convenience is not permission to upload identifiable material.

All recipes