Looping through PDF files to extract specific data using Uipath

+1 vote
I have a bunch of PDF documents which are basically Invoices and I want to extract the information like Invoice No, Issue Date, Total Amt etc. Can anyone please tell how I can automate this using UiPath.
Mar 5 in RPA by Rashi
1,992 views

2 answers to this question.

+1 vote
Best answer

Hi Rashi, you can access all the files, if they are in a same directory using 'Directory.getFiles(File_Path)' and then you can loop through them using 'For Each'. You can simply use 'Read PDF with OCR' to read the pdf files and extract the complete texts out of it:

answered Mar 5 by Anvi
• 13,840 points

selected Sep 6 by Abha
+1 vote

Hi Rashi,

I actually had this same issue and I figured it out. Maybe see if this helps you out:-

  1. Place a 'Sequence' in your main workflow area.
  2. Choose 'Select Folder' activity block to let UiPath "find" where your PDF files with the text, is located on your PC.
    • You need to then choose "Properties" on the right-hand side, and assign this "Location" to a variable. (Please keep in mind that variables CANNOT HAVE blank spaces or punctuation or math symbols. The only exception is use of an underscore (_).)
    • In addition ​you have to set the same variable name in the Variables Panel (at the bottom of your screen) because if you do not do that, an error will appear at this point in your workflow.
  3. Now, you can either put a 'Read PDF With OCR' or a 'Read PDF Text' block to capture text from the PDF files on your PC. ==> The 'Read PDF With OCR' activity block is better in the sense that BOTH text and images are captured (i.e. better Data Scraping); I found that the 'Read PDF Text' unfortunately ignores images which look like text but are not real text.
  4. An alternate to (3) is via a 'Get PDF' or 'Get PDF Text' activity block.
Hope this helps!
Best of luck to you! :)
- Dave C.
answered Aug 26 by Dave C.
Hi Dave, thank you sharing your valuable answer. Can you also share the workflow's screenshot?
Hi Rashi,

Because I am doing my UiPath workflow from an office PC, and I am currently responding on my home/personal PC (without the UiPath program), I will not be able to unfortunately share screenshots of the workflow. Also, with my work laptop, there's much client information that is very confidential to my employer, and I'm not permitted to disclose those information in public. (My personal PC does not have UiPath.)

My sincere apologies for this inconvenience, as it would also have helped me to view screenshots of anything that would require visual aid.

Very Best,

- Dave Chandra
Thanks Dave, I understand your concern. No issues about the screenshots. Your answer is quite helpful. I am upvoting your answer too.

Related Questions In RPA

0 votes
0 answers

HOW to extract a column data and save it in the new sheet using UIPATH

Sep 12 in RPA by anonymous
• 120 points
94 views
0 votes
2 answers

Moving Files from one folder to another using UiPath

if you want to copy and move ...READ MORE

answered May 29 in RPA by Venkat
• 320 points
2,036 views
0 votes
1 answer

How to encrypt and decrypt files using UiPath?

Hey Ashmita, if you want to encrypt ...READ MORE

answered Mar 11 in RPA by Abha
• 25,740 points
452 views
0 votes
1 answer

UiPath automation for converting a .docx file to a .pdf file

Hey Rashmi, that's actually a very easy ...READ MORE

answered Mar 8 in RPA by Abha
• 25,740 points
684 views
0 votes
1 answer

Robot Manager in UiPath

the robot.exe file is located in: C:\Users\USER_ACCOUNT\AppData\Local\UiPath\app-17.1.6523\Ui-Robot.exe Hope it ...READ MORE

answered Apr 17, 2018 in RPA by wrecker
• 3,110 points
436 views
0 votes
1 answer

Automation in Uipath

you can use the Database package for connecting  ...READ MORE

answered Apr 17, 2018 in RPA by wrecker
• 3,110 points
349 views
0 votes
1 answer

UiPath vs Workfusion

in WorkFusion, you can create a script ...READ MORE

answered Apr 17, 2018 in RPA by wrecker
• 3,110 points
1,078 views
0 votes
1 answer

How to extract specific type of files from a directory using UiPath?

Hey @Avani, if you want to extract ...READ MORE

answered Mar 13 in RPA by Anvi
• 13,840 points
2,249 views
+3 votes
1 answer

How to extract data from a website and save it to excel using UiPath?

Hi Piyush, if you want to extract ...READ MORE

answered Mar 8 in RPA by Anvi
• 13,840 points
5,145 views