OCR Activities
Version: 1.0.0 · ID: zoan-packages-ocr · Author: Zoan Software
The OCR (Optical Character Recognition*) package reads text that appears within an image: a scanned PDF, a photo of a document, a screenshot. It’s the add-on to the PDF package: When a document is an image (no selectable text), PDF activities can’t read it — but OCR can.
It uses the Tesseract engine, a widely used open source text recognizer.
Idioma del texto
Section titled “Idioma del texto”Almost all activities accept a parameter language with the language code of the text to be recognized:
| Value | Idioma |
|---|---|
eng | English (default) |
spa | Spanish |
eng+spa | Several languages at the same time |
Indicating the correct language greatly improves precision for accents and locale-specific characters. For Spanish text, always use
language = "spa". To see which languages are available, use OCR Get Available Languages.
Image preprocessing
Section titled “Image preprocessing”The preprocess parameter applies a cleanup to the image before recognizing it, which improves the result on poor quality scans:
| Value | What are you doing |
|---|---|
none | No preprocessing (default in most) |
auto | Limpieza completa: quita ruido, binariza y endereza |
deskew | Just straighten a crooked image |
binarize | Convert to black and white (improves contrast) |
Two sources: file or screen
Section titled “Two sources: file or screen”- From an image file (
.png,.jpg,.bmp,.tiff): OCR Recognize File and structured extraction. - From the screen: OCR Recognize Screen Region (one area) and OCR Screenshot (the entire screen). These require an interactive desktop session (same as the Desktop package).
Activities
Section titled “Activities”Reconocer texto
Section titled “Reconocer texto”| Activity | Type | Output | What it does |
|---|---|---|---|
| OCR Recognize File | ocr-recognize | string | Read text from an image file |
| OCR Recognize Screen Region | ocr-recognize-region | string | Read text from an area of the screen |
| OCR Screenshot | ocr-screenshot | string | Read all text on the screen |
Buscar y ubicar
Section titled “Buscar y ubicar”| Activity | Type | Output | What it does |
|---|---|---|---|
| OCR Find Text | ocr-find-text | object | Find the position of a text |
| OCR Get Lines | ocr-get-lines | List | Structured list of lines and coordinates |
Structured extraction
Section titled “Structured extraction”| Activity | Type | Output | What it does |
|---|---|---|---|
| OCR Extract Pattern | ocr-extract-pattern | Dictionary | Extract fields with regular expressions |
| OCR Extract Form Fields | ocr-extract-form | Dictionary | Extrae texto de regiones nombradas |
| OCR Extract Table | ocr-extract-table | DataTable | Detect a table in the image |
Utilidad
Section titled “Utilidad”| Activity | Type | Output | What it does |
|---|---|---|---|
| OCR Get Available Languages | ocr-get-languages | List | Idiomas disponibles |
A typical flow
Section titled “A typical flow”Read a scanned invoice and extract its number:
OCR Recognize File path = = rutaImagen language = "spa" preprocess = "auto" → output: textoSet Variable name = numero value = = regexFind(texto, "FAC-\d+")Next steps
Section titled “Next steps”- OCR Recognize File — read text from an image.
- OCR Extract Pattern — extract specific fields from a document.
- PDF — for PDF with selectable text (no OCR).