OCR for Cyrillic and Latin script and PDF/A: what processing reads from a scan
A scan in Cyrillic, a contract in Latin script, a letter in English — all three become searchable page-level text and a PDF/A-2b archival copy, while the original stays untouched.
In short
- The default recognition languages are Serbian in Cyrillic, Serbian in Latin script and English; the organization can change them.
- Text is kept per page, with its source and word positions, so a Latin-script query finds a Cyrillic page and a hit leads to the exact page.
- The archival copy is PDF/A-2b with a text layer by default; the original never changes, and a signed PDF is not sent to OCR.
- When the OCR service is down, the document is still taken in, and the archival copy and text follow later.
- Over the text it reads, NG Copilot answers questions citing the exact page, in both scripts.
Short answer: when a scan or a photo reaches NG DMS, processing produces the text of every page through OCR for Serbian in Cyrillic, Serbian in Latin script and English, then builds an archival copy in PDF/A-2b with a text layer. The original never changes. Processing also determines the language and the document date and makes a first-page thumbnail.
Why two scripts are a real problem
One registry office receives decisions in Cyrillic, contracts in Latin script and letters in English. If recognition is set up for one script only, the other comes out as garbage and the document cannot be found. That is why there are three default languages: srp+srp_latn+eng, which the organization can change in settings.
Search solves the other half: the text of every page is also stored in a normalized form, so a query typed in Latin script finds a Cyrillic page and the other way round. How searching works is described on the Search and viewer page.
What processing does, in order
- Keep text that is already there. In the default mode OCR runs only on pages without a text layer; a page that already has text keeps it.
- A fallback path. If recognition yields fewer than 50 characters, it is repeated in forced mode. If that fails too, a pass that skips pages it cannot render follows, and in the end the original's text remains.
- Archival copy. A PDF/A-2b with a text layer is produced; the organization can choose another PDF/A level or plain PDF. Downloads return the archival copy by default.
- Thumbnail. The first page becomes a 500-pixel-wide thumbnail for lists and preview.
- Language. It is determined without a model: the script identifies Cyrillic, and frequent words plus the letters č, ć, ž, š and đ decide between Serbian Latin and English. When it is unclear, the field stays empty — empty beats wrong.
Every step is written to the processing log with its outcome in words: done, skipped and why, or failed and with which message.
Text per page, not one big block
Text is stored per page and per version, with its source (text layer, OCR, plain text or manual correction) and the position of words on the page. That is why a search hit leads to the exact page, not just the document. Limits exist — 200,000 characters per page, for example — but text is never cut silently: the version is then marked index incomplete.
Office files, e-mail and signed PDFs
- Word, Excel, PowerPoint and OpenDocument files are converted to PDF/A, and the text is read from that archival copy.
- .eml and .msg messages become PDF/A with header, body and attachment list; external content from an HTML message is not loaded.
- A signed PDF is not sent to OCR. Its archival copy is the original itself, so the signature stays valid.
When the OCR service is down
Recognition runs in a separate service with no outbound network access. If it is temporarily unavailable, the document is still taken in with the original's text, and the task says the archival copy and OCR will follow. An administrator later creates whatever is missing with one command.
The date on the paper. Date sources are tried in this order: a given value, the file's metadata, the first valid date in the content, then the file name if that is switched on. For a scan, the file metadata often carries the scan date, so the date printed on the document stays a suggestion. Whether the order of sources will become configurable is still being decided.
From text to answers
Once the text of every page is read, NG Copilot works over it too: it answers a question in your own words with a citation that opens the exact page, and extracts amounts, dates and numbers into the document's fields. For poor scans and handwritten notes Copilot supplements classic OCR, and the user confirms the suggestion. An archival copy on its own is not trusted electronic preservation — the difference is explained in Trusted electronic preservation: what it is and what it is not.
The whole path from file to document is described on the Capture and processing page. To see it on your own scans, book a demo.
Frequently asked questions
Which languages does NG DMS recognise on a scan?
By default Serbian in Cyrillic, Serbian in Latin script and English. The organization can change the list of languages in the OCR settings.
Does OCR change the original file?
No. The original stays as it arrived, and an archival copy in PDF/A-2b with a text layer is created next to it. A signed PDF is not sent to OCR, so its archival copy is the original itself.
Does a Latin-script search find a document written in Cyrillic?
Yes. Text is also stored in a normalized form, so Cyrillic and Latin script find each other.
What if the OCR service is down when a document arrives?
The document is still taken in with the original's text, and the task says the archival copy and OCR will follow. An administrator creates them later with one command.
Does NG DMS recognise handwriting?
For handwritten notes and poor scans, classic OCR is supplemented by NG Copilot, which suggests the text and field values; the user confirms the suggestion before it is written.
Want to see how this looks in NG DMS?
We will show you in a demo, on examples from your own registry office — from the scan to NG Copilot’s answer. No obligation.