Extract text using a relative clipping region


#1

The main goal is to extract the monetary value of several pdf invoices. To achieve it, I was asking UIPath to find the image “Total:” and then use OCR to extract the value of the text that is to the right of image found.

This worked well if the “Total:” was in the same place in every document. However if the invoice is a bit longer, the “Total:” drops down and the clipping region remains the fixed (I saw that this region is defined by the top left pixel and the lower right pixel). This means that it is always trying to clip the same region, despite the position of “Total:” in the document.

Basically, what I need is to find the “Total:” and then OCR the region that is to the right of the refered image. Can someone tell me what’s the best way to acomplish what I need, please?

Thanks,
Bernas

P.S: This is my first post, so I am sorry if it is the wrong thread or if it is duplicated.


Check if something exists next to an element
#2

Are you working through Citrix? If not then you should use other options before looking for the image e.g. click relative to text

If you are going via Citrix then it sounds like you need to expand the clipping region. This will take longer to scan but should still work. However, if the word total is likely to appear elsewhere on the pdf then this will cause further problems.