Image To Text

#1

Example will explain you how to create a simple Zappy automation task to gets the text from image and also image contents are saved into the text file.

Step 1: Images
image

Step 2: Right click on Zappy icon at bottom right corner of your window and select Task Editor.
image
Step 3: Click on Open folder and select MultipleImagesConvertIntoTextFile.zappy task, click on Open as shown.
image

Step 4: Click on Get Files In Directory action and set the properties…

  • DirectoeryPath – Click on 3 dots and set Selected Folder from Variable of Select folder action.
  • FileSearchPattern – Set as *.jpg it gets all jpg files form the selected folder.
    image

Step 5: Click on Ocr To Text and set the properties based on requirment.

ImagePath – Here set ${LoopItem} . LoopItem contain the path of the files from the selected folder.
image

Step 6: Click on Run Script action and set the Script.

Script – This script repalce the jpg file into text file.
image
Step 7: Click on File Write To Text and set the properties.

FilePath – Click on 3 dots and set the reference of Run Script’s Evaluation Result
image .

  • Text – Click on 3 dots and set the reference of Ocr To Text’s Text .
  • Text – Click on 3 dots and set the reference of Ocr To Text’s Text

Step 8: Click on Execute. .image

Step 9: Select folder from your system which contain jpg files and then click on Select Folder button
image

Step 10: You can see “Successfully Executed Task” message from Zappy on successful execution.
image

Step 11: The resulted text files like this.

Converted Image to text file.
image