OCR Invoice Process


I am automating a process, where I need to get data from a scanned Invoice… I am using relative scrapping and using an image for getting the coordinates of the data to be fetched…

Since this image is changing in each Bill, I am not getting any data from the bill.

I have seen an action, get OCr text position… How can I use this, to get the position of the text ; instead of image itself and get text from a relative position from that retrieved position?

@HareeshMR Can you please help in this?


since it is changing everytime, the relative text position and get text will not give expected results. If you have anything constant near that text which you want to capture, then we can use the OCR’s to get the entire text from the image and then we can substring the required text.

Can you attach the image if it doesn’t contain confidential data and the text you want?

I cant share the image… But assuming the text is read properly… And I want to set coordinates to read the text, how can I do that?

If your text positionand the pixels of the image are same everytime , then this will work. Or else you need to use someother methods.

Similar thing i have earlier,
Here are the steps I did :

  1. Read the image using Python tesseract
  2. Store the entire string into a notepad file and reading it
  3. Then, using string activities to get the required string between two specific words

This one will give you the required everytime whatever may be the position of the string and whatever may be the image pixels

Can I perform relative scrapping using Find text location in place of Image?

Yes, can you please try and let me know if it works :slight_smile:

And attach the workflow if it works, so that I will have a look. To be honest,I haven’t used find text position till now.

Thanks… Actually I have tried using this in another RPA tool… Need to see how it works in Uipath

Ohh, thats great :smile: … Please let me know if it helps along with the workflow

Hi buddy @Pankit

Usually relative scrapping works by using a element or image as constant positioned term with which the text is obtained from the relative scrapped region and the region can have any text or numbers.
So the constant anchor positioned term must be same always but here it’s getting changed…
Since it is a scanned invoice it very easy to retrieve the term we want with simple Read OCR PDF activity which usually reads the entire scanned off and gives us the text in that pdf as a variable output of type string
— with which we can get the text we want using string manipulation
—so initially let’s try to fetch the details using Read OCR PDF activity and get the output with a string variable and use a simple assign activity to get the term we want using string manipulation like split or regex method.

Simple as it is buddy
Kindly try this and let know for any queries or clarification
Cheer @Pankit

Actually, my question is similar to this :

Fine its mentioned like he is trying to get a text relative to anothe text, but not sure from where, well it can be a web application, desktop application, etc
but here we are in pdf, which can be handled with this scrape relative only when the application is installed in the machine and more over the page where that text appears must be a known factor and we might miss it at some cost, it may be in one page for the first time and in another page for next time,
So we can handle this with Read OCR PDF activity that would fetches all the details in the pdf and later we can get the required one based on string manipulatin

Cheers @Pankit