Combining Data from Multiple Pages into One PDF per Account Number

Hi,

I’m automating a process in UiPath where I extract data from a PDF of 1000 pages.
Each page is checked for an account number, and a PDF is generated for each account found.

However, if the same account number appears on multiple pages, my current setup creates multiple PDFs for the same account. but i still want that data of multiple pages with same account number.
I need to modify the workflow to create just one PDF per account number, consolidating all data from any page that features that account number into a single pdf named by that account number.

How can I adjust the workflow to avoid duplicate PDFs and instead compile all relevant data into a single PDF per account number?

Here are the screenshots of my workflow:

this if condition captures account number from each pdf page, seperated by \n
and if theaccount number is found it breaks the loop…


the range of creating a new pdf is the pgCtr counter variable which creates a pdf for the ongoing iteration.

Thanks for your help!

Hi @samantha_shah

Recently i have worked on same usecase. Modify your Account Number regex and try.

BlankProcess21.zip (175.6 KB)

Change the regex in the below according to your PDF

InvoiceNum1=System.Text.RegularExpressions.Regex.Match(str_ExtractedData,"(?<=INVOICE )\d+").Value

Regards,

@lrtetala

thanks for the reply , but i have already captured account numbe from the pdf pages , i want to capture multiple pages data belonging to same account number in a single pdf

can you help me (for reference i have my own workflow in images above)