GuidesDocuments
Filing case documents and searching inside scanned files: how to find a phrase in a three-year-old judgment
Published 7 September 202625 Rabiʻ I 1448 AH4 min read
In short
A Saudi law firm's archive is mostly pictures: deeds and notifications from Najiz, scanned signed contracts, photos from a phone. Searching file names does not reach what is inside them. The answer is to extract the text from every file when it is uploaded and store it beside the file, so a search for “end of service” or a deed number searches the contents of the files, not their titles. Two conditions: the extraction must be Arabic and accurate enough, and the original file must stay as it is.
Why the firm cannot find what it has
- The file is called “scan_0012.pdf” or “IMG_4471.jpg”, and nobody remembers what is in it a month later.
- The judgment is saved on the machine of the lawyer who worked on it, in a folder named their way.
- A PDF from Najiz looks like text, but a search inside it finds not a single word. The reason is below.
- The photo from the phone is skewed and dark, and was saved as it was.
- The edited version was saved over the original, so there is no record of what was actually signed.
What Arabic text extraction (OCR) does, and does not do
Text extraction turns the image of a page into text that can be searched. Arabic has requirements English does not: the page should be read at around 300 dots per inch, the script on the page should be detected first, and an Arabic page should be read by an Arabic model alone. Reading a page with Arabic and English models together looks like the safe choice for a bilingual firm, but in practice it makes the software prefer a Latin reading of Arabic letter shapes, so a phrase like “under a contract” comes out as meaningless Latin characters.
What it does not do: it does not read handwriting reliably, nor stamps and signatures, nor a very poor image. It gets numbers wrong more often than letters. So the extracted text is a search tool and the original file is the evidence, and neither replaces the other.
What about Najiz files?
The deeds and notifications you download from Najiz are PDFs with a text layer, so you assume they are searchable. But in many of them that layer is stored one letter at a time: “Court of Appeal” reaches the search software as separate, disconnected letters. The search for the word fails silently, and nobody tells you why.
The answer is to treat a Najiz file as an image: read its page by character recognition instead of relying on the text layer, and “Labour Court of Appeal” comes out as proper words. Test it on the first file: search for a phrase you know is on the last page of the deed.
How to organise the archive so it stays searchable
- 01
A folder per case, with five fixed folders inside
Judgments, contracts, memoranda, evidence and correspondence. The same folders in every case, so no lawyer invents their own arrangement.
- 02
The file name is its type and date, not the scanner's number
“First instance judgment 1447-08-12” beats “scan_0012”. Date first as year, month, day, so files sort chronologically.
- 03
The original is uploaded and never edited
What was signed or issued is uploaded as it is. An edit is a new version beside the original, not over it.
- 04
Versions, not copies
“Final memo 2” and “Final memo 2 revised” are how the correct version gets lost. A new upload is a version of the same file, with who uploaded it and when.
- 05
The file lives in its case
A document not attached to a case is lost at the first search. From inside the case you should see its documents, and from the document you should get back to its case.
A checklist for scanning
- 300 dots per inch, in black and white or greyscale, colour only for stamps.
- The page straight and with full edges, one page per image.
- One document per file. The judgment on its own, the contract on its own, not a bundle of papers in one file.
- Phone photos only when necessary, in enough light and directly above the document.
- After uploading, search for a phrase you know is in the file. If it does not come up, the scan needs redoing.
Common questions
- How accurate is Arabic text extraction?
- With a good scan, most words are read accurately enough for search. Numbers, stamps and margins are the weakest points. Treat the extracted text as a pointer to the page, then read the page itself.
- Can phone photos be searched?
- Yes, after the image is processed: converted to greyscale, its contrast improved, and enlarged if small. But a scanner beats a phone whenever possible.
- Does extraction change the original file?
- No. The original stays as uploaded, and the extracted text is stored beside it for search and can be saved as a separate file.
- We have an old archive of thousands of pages. Where do we start?
- Start with active cases, then those closed in the last three years, because those are the ones actually searched. Upload in batches; extraction runs in the background without holding anyone up.
How this works in QanoonTech
When any file is uploaded, its text is extracted in the background without anyone waiting: every page is read at 300 dots per inch, its script is detected first, Arabic is read by an Arabic model alone, and Najiz files are treated as images rather than text layers. Search shows the documents the phrase appears in with the passage that matched, and the extracted text can be saved as a Word file beside the original. Every new upload is a version, deleted files stay in the trash, and extraction runs inside the system on the office machine with no external service.
- Copiedمذكرة الرد على الدعوىPDF
مذكرات · 21/03/1448 هـ — 2026/09/03
…تدفع المدعى عليها بأن كامل مستحقات نهاية الخدمة سُدّدت بموجب تسوية نهائية موقعة…
- Copiedصحيفة الدعوى — المدعي عبدالله الحربيPDF
مذكرات · 16/01/1448 هـ — 2026/07/01
…يطالب المدعي بمكافأة نهاية الخدمة عن أربع سنوات وبدل إجازات مستحقة…
- Waitingعقد العملPDF
عقود · 12/12/1447 هـ — 2026/05/29
…تُحتسب مكافأة نهاية الخدمة وفق المادة الرابعة والثمانين من نظام العمل…
- Copiedكشف الراتب — يونيوPNG
أدلة · 19/03/1448 هـ — 2026/09/01
…صافي الراتب بعد خصم التأمينات، ورصيد نهاية الخدمة المستحق…
Try the system the way your firm would use it.
A full demo with sample data, running in your browser now, with no sign-up and no meeting. And if you would like to talk about your firm, write to us.