How to Extract PDF page fully which contains particular Data as Validation

I have a PDF which contains 42 pages, the data I want to search for is a serial number (For Eg. L08806668). Now I need to save this as PDF (last page range) & another string value “Declaration” which will give me the start page range.
My requirement is to save this as a new pdf file (L08806668.pdf) from the range with the ‘Declaration’ value to the serial number.

Can u help me find a solution?

Hi @Santhosh_Kumar_G

What you can do is Get PDF Page count, store it in a variable.
Loop through all the pages from page 1 till lastPage.
Use Read PDF activity: In the Range Property give currentPage:
And then check with an if condition whether that keyword is found on currentpage: if it is found. Store it in a variable DeclarationFoundOnPage: and then Use Extract PDF Page Range with range as

DeclarationFoundOnPage.toString+“-”+lastPage.toString

Hope this Solution works for you.

Thanks
Happy Automation!

Hi Adithya,

Really appreciate your reply…
Your answer gave me an insight to a solution…

I think I’m going to take steps mentioned in below link to be precise.

Hi @Santhosh_Kumar_G

Happy to help in anyway!

Happy Automation!

Thank you,

Now that I have created the list of pdf files to be extracted using range value.

But now my challenge is to extract only certain pages from different files. Let me show u an example.

Data page No. | Reference page | File Path
5 3 File 1
7. 3. File 1
2. 4. File 3

From the above table, I need to combine all
Files (i.e. file 1, file 3) to a single pdf file, such that new file should contain pages : 5,3,7,2,4 from file 1 & 3.

Hope u understand my question.