Automation Action: Convert Image To Text Using OCR
Convert an image file or attachment to text using optical character recognition (OCR). Can also extract images from PDF files and convert these to text.
Converts image files or image attachments to text using optical character recognition (OCR) and assigns the extracted text to a variable. This action can also extract images from PDF files and the convert these images to text.
Select a Image To Convert - this can be any local file or a %variable% replacement. You can specify multiple files if required, separated by commas (any file paths that contain commas must be enclosed in quotes).
Enable the Include Incoming Attachments option to convert attached images matching the Matching Mask. Enter *.* to convert all supported attachments (png, bmp, gif, tiff, jpeg, pdf).
The Language defaults to 'eng' (English). You can specify a different three letter language code. You can download additional language packages from https://github.com/tesseract-ocr/tessdata. These should be copied to the Tesseract tessdata folder.
The Output Type can be text, xml or CSV. If the Preserve Layout option is enabled then space padding is preserved.
If multiple images are converted within the same action then the extracted text from each image will be appended to the returned text.
Select the variable to receive the plain text from the Assign To list.
To test the text extraction select or enter an image file and click the Test button. The results will be displayed.
This action uses the open source Tesseract OCR library. Tesseract is not installed by default with the ThinkAutomation setup. If Tesseract is not installed the Install Tesseract button will be visible.