1
votes

I have this pdf and I have to select fields some fields from it and I am able to now read entire text from pdf using read pdf text ! How can I choose fields out of it and insert it into it ! I tried to do through pdf to excel but that was not working for me ! here is mine pdf there are many pdf like this and every time I will generate new excel sheet for a respective pdf ! here is that pdf ! Link I have to choose the fields Invoice Date,Id,description,qty,price,gst,total,subttotal.

2

2 Answers

3
votes

I just looked at document properties in the PDF you supplied and it indicates that the invoice is tagged. That's good news.

With a tagged PDF, you can use UiPath Anchor Based data extraction, which is much easier than having to rely on the mediocre UiPath OCR data extraction facilities.

enter image description here

Anchor Based Activities

The key is to use the UiPath Anchor Based activity, and then select a hardcoded value beside or above the text you need with a find element activity, and then use the get text activity. This will work well on name-value pairs.

If the data is tabluar, then you will need to use the UiPath scrape facilities which will return structured data in a datatable. You may need to apply some logic to the datatable returned to extract the exact fields you need. But if the PDF files are all in a consistent format it shouldn't be too onerous.

Adobe Reading Order

By the way, sometimes you need to change the reading mode of the PDF to infer or tagged if it is set to something else before these UiPath activities work properly, so make sure the correct reading mode is set in Adobe reader.

Here's an example of how to extract PDF text and save to Excel. It seems to match your business requirements.

Good luck with UiPath!!!

0
votes

Please read the PDF first. If the PDF is of normal format then please use Read PDF Text activity and if the PDF is of scanned PDF format please use Read PDF With OCR.

Then use Regex to get your desired output.