PDF file extraction and edit the file

Hi Experts,

Greetings!

I hope you are all doing well.

I have one use case, it is related to PDF extraction. I have one bank statement, The expectation is I have to add the total of cr dt and the balance column end of the statement. The file has multiple pages and each page looks like the following

the last page looks like the following

If you can see the yellow highlighted area, there I have to add the total value. Now what would be the best approach to solve this use case?

Note: The first page of the statement is details about the bank and account details. So need to read the file from the second page in order to extract the amounts.

Please feel free to ask if you have any questions, your help would be highly appreciated.

Thank you

Hi @learning_sourav

You will neet UiPath.PDF.Activities package inside that you can use read pdf text where you can give Range - The range of pages that you want to read (e.g. “2-5, 7, 15-End” or “All”)

You can use the following approach:

  1. Create one DataTable with all the required fields using Build DataTable activity.
  2. And then read one by one pdf file using Read PDF text activity to read the data from PDF file and it will give you output as String. And then use String manipulation functions or Regular expressions to fetch required details from it. Use Add DataRow activity and pass values to add into the DataTable.
  3. Perform Calculations: Once you’ve extracted the required data, perform calculations on datatable to get the final amounts.

Hope this helps :slight_smile:

Hi @learning_sourav

is it possible provide the pdf ?

Hi @learning_sourav

I sent to you a sample that sum the expected values and give to you the Total and Balance

Then generate a single PDF page with this information and append to the original source PDF

I hope it help you

Cheers

1 Like

Hi @learning_sourav,

If you to preform the attended automation on PDF Data extract part then, you can go with Clipboard AI

Reference:

Thanks in advance,
Jayavignesh G

Hi @learning_sourav ,
You can follow this steps:
1.read pdf to get string - strPDF
2.generate data table form string -dtPDF
3.use for each row in data table to get sum
could you share your file, if it’s private, you can send me in message, I will code in detail
regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.