Skip to content

OCR Recognize File

Type: ocr-recognize  ·  Package: OCR Activities v1.0.0  ·  Output: string

Recognizes and returns all text from an image file (.png, .jpg, .bmp, .tiff). It is the central activity of the package: reading the content of an image or a scanned document and then extracting data with expressions.

Passes the image through the Tesseract engine and returns the recognized text. Indicates the language of the text to improve accuracy, and uses preprocess to clean up low-quality images. See language and preprocessed.

ParameterEditorDescription
pathexpressionImage file path.
ParameterEditorDescription
languageexpressionLanguage code: eng (def.) · spa · eng+spa.
preprocessexpressionLimpieza previa: none (def.) · auto · deskew · binarize.

Returns a string with the recognized text.

Read a scanned invoice in Spanish and extract the total:

OCR Recognize File path = = rutaEscaneo language = "spa" preprocess = "auto" → output: texto
Set Variable name = total value = = regexFind(texto, "Total:\s*\$?([\d.,]+)")