How to extract text from image using OCR




I am new to UI path and I would like to know How to use OCR with Image or PDF files. Could anyone send me a sample or steps to do it.

Thanks in advance.


Go through this articles



did you sign up for this.
world’s first open online training platform for RPA users.

Happy Automation.:slight_smile:



I got an exception when i tried with Microsoft OCR Engine and Abbyy OCR engine.

It’s working fine with Google OCR but not able to read the entire text properly.

Same way how can read the text from an image?



Hi Ranjith,

How can I read particular portion of the PDF?


You have to use string manipulation or Regex to read particular portion of the PDF.



If possible can you provide me some sample or please let me know the steps to do it.


Please find attached xaml file where i have fetched Fax Number, File# and Date from the PDF.
I have used RegularExpressions to fetch the data. You can also achieve the same using string manipulation as well.
You can use and try different regular expression
and for string manipulation (23.2 KB)

Need help to OCR the Health care form HCFA1500
How can i extract the content in a highlighted image

Thank you @Bharat_Kumar


thanks bharat this information is very helpful for me … I have one doubt if any functions are available to check the given string is date or not except IsDate() function


try this Regex for checking the Invoice Date. it will work for dd/mm/yy[yy]or dd/MMM/yy[yy]. It will also support dd-mm-yy[yy]( dash as a separator). I dont remember if I tested it for space as a separator but hopefully it would work for dd mmm yyyy ( space as separator). And it will also take care if there are hidden spaces ,tabs , #, : and in most cases newline between the label and the actual date.


This should work for most of the invoice templates if they are already OCRed.

Unfortunately 99.99% of the AHT is spent in entering Line items in the P2P systems. So you would want to use a tool like abbyy flexicapture for a long term enterprise solution


Thanks a lot Bharat, I was really stuck for a long time and your solution was absolute bang on.
Cheers mate.