Reading Scanned Documents
A scanned page is a picture of text: until something reads it, it is stored and served but can never be found by search. The platform can read scans with one of three readers, and one of them is an AI model on the gateway's ocr role. This article covers choosing a reader, setting up the AI one, and what to expect from each.
Where to find it
Architect Panel → Automation:
- Tasks — Document Text Extraction, which sends each queued scan to the reader
Architect Panel → Configuration:
- AI Settings — the
ocrrow in Which provider each AI feature uses
Architect Panel → Activity:
- AI Usage — one run per scan read by AI, with its cost
Architect Panel → Security:
- Classification Levels — Allow Export, which off-site readers must respect
The three readers
- Tesseract, a program on your own server. Nothing leaves. Scanned PDFs can be read too if a second program that renders PDF pages is installed.
- AWS Textract. The file leaves the system. It reads images and PDFs, but only the first page of a multi-page PDF; the rest is recorded as unread rather than claimed as indexed.
- An AI model, through the gateway's
ocrrole. The file leaves the system. Of the image types the document index sends for OCR, it reads JPG and PNG up to 5 MB, but not TIFF, and it is never sent a PDF.
The reader is chosen by your hosting administrator in the server's configuration, not on a screen, and it ships switched off. A document whose classification does not allow export is never given to Textract or the AI reader; it is recorded as a failure naming the reason, and a local reader would read it.
Setting up the AI reader
- Ask your hosting administrator to set the installation's OCR reader to the AI gateway.
- On AI Settings, decide the
ocrrole's provider and model. Left on Inherit it uses thebuildermodel; choose a model that reads images, and consider a cheaper one thanbuilder, since transcription is a simple task. - Save, and press Test beside
ocron AI Usage. - In Tasks, make sure Document Text Extraction is switched on.
- Upload a scanned image as a document, wait for the next run, and search for a phrase from it.
- On AI Usage, filter Recent AI calls by the feature
ocrand open the run: it shows the cost and the document version it read, but no text.
What the AI reader does
- It asks for a transcription and nothing else: the words exactly as they appear, in reading order, with [?] for an illegible word. A description of the document would be searched as if it were the document's own words.
- It keeps the cost, never the text, in the run log. The transcription already lives with the document, under its access rules, classification and redactions.
- It is charged to the document's tenant where AI billing is on. When the tenant's credit is used up, the scan is recorded as "Not read yet" with the credit sentence, and is not re-read automatically after a top-up.
- A very dense page may be cut short. The part that was read is kept, and the shortfall is noted in the error log.
Scanned PDFs
A PDF goes to the ordinary PDF reader first. When that finds no words at all, it is tried again through OCR, but only where the reader can take a PDF: Textract, or Tesseract with the page renderer. The AI reader is sent images only, so with it a scanned PDF stays unread.
Supplier invoices from Xero
Separately, one installation-specific extractor reads supplier bills that arrive from Xero with an attachment, using AWS Textract's expense analysis and label rules held in that app's own tables. It normalises UK and European number formats and, where a line's total agrees with its quantity times its price, prefers that total. It has no panel screen and is not part of a standard installation.
What goes wrong, and how to tell
- Scans are never read: no reader is configured, or the extraction task is off.
- TIFF scans are never read with the AI reader: the AI reader does not take TIFF. Scan to PDF or JPG, or use Tesseract.
- A classified scan fails with a reason about leaving the system: that is the export rule working.
- AI Usage shows ocr runs failing with not_configured: the
ocrrole's provider has no key.
Worked example
A team receives photographed delivery notes as JPGs. The hosting administrator sets the reader to the AI gateway, and the architect points the ocr role at a smaller model that reads images, tests it, and confirms the extraction task is on. Next morning the notes are searchable by consignment number, and AI Usage grouped by feature shows what reading them cost.
Recommendations
- Use Tesseract if anything you hold forbids export; it is the only reader that can read everything.
- Give the ocr role its own, cheaper model rather than inheriting builder.
- Prefer JPG or PNG scans if you use the AI reader.
- Check AI Usage after a bulk upload: every scan is a paid call.