Extract Product Name and Price from PDF and multiply prices by a variable after

Hi!

This is my first post here. I am very excited to join this community - any help is greatly appreciated.

I am having an issue grasping the best way to do what the title suggest. I want to extract Product Names (lines) and corresponding prices from a PDF, whereafter the goal is to multiply all of these corresponding prices with some number (a logistics cost).

How do I tell UI Path to take the numbers next to the product names (AND NOT any other number)?
Thank you for your time!

Best regards,
Peder

Hi @PederRC

Welcome to UiPath Community Buddy…Thats really a great question to start with

Fine…To get your query resolved kindly refer the below steps buddy…

  1. Lets take like you have stored the logistics cost in integer variable named Logistics_Cost
  2. Now to get the value from pdf, use Get text activity to get the value of the product name and price by just selecting them (meant like clicking them)
  3. so with Get text activity with output value as strings named Product_Name and Price_Value…ahh you might get a question now…what do i do if i am not able to select the element that is unable to select those product name and price unlike a native pdf (native pdf - can access elements)…Simple buddy…Use ocr activities. And this can be done with screen scrapping option in the design menu with you can scrape and get the value…Kind suggestion is to use OCR with google not with microsoft, because google gets clear wordings of image in smaller size…so use two screen scrapping to get those two values
  4. Use assign activity to multiply the logistics cost that you saved already to a variable
    like in assign activity
    Total_Cost = Price_Value * Logistics_Cost
  5. Thats all buddy…you are all done…

Hope this would help you…
Cheers…

2 Likes

Hi @Palaniyappan

Thank you for your extraodinary help.

  1. One question: how do I make sure that the locating of the product names and prices are completely automated for future use of the robot? The “issue” is, that the invoices may not always look the same and may have more lines of products (and prices) than the previous.
    – Also, it would be amazing if I could locate the word “Freight” (FindText) and then save its corresponding cost/price in a variable. How will UI path know which prices belong to which product names?

EDIT: the purpose of this is to take a certain Freigh Cost located somewhere on the PDF and split it out onto the product prices for accurate product pricing.

Thank you for your time!
Best regards,
Peder