Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Power Automate Desktop
Suggested answer

Split PDF into multiple PDF

Like (1) ShareShare
ReportReport
Posted on 29 Nov 2022 15:13:57 by 335

I have created a flow to split the single pdf into multiple single page pdf file.

 

I have a scenario like, the files usually has 50+ pages, each page is an invoice, COA, Waybills, etc., and each invoice, COA, Waybills, etc. should be split into 1 single PDF.

However, sometimes, an invoice, COAs runs to 2nd or 3rd page. So I cannot use a fixed number to do the split. In case like this, on the 2nd and 3rd page, there’s a keyword of “Page of”.

 

How could I configure so the bot knows where to do the split correctly?

  • Suggested answer
    Esbastian Profile Picture
    24 on 30 Jan 2025 at 20:14:44
    Split PDF into multiple PDF
    Hi VDI,
     
    I would do the the following:
     
    1) Create 1 variables, start_page
    1) Create a Loop with the number of pages in the PDF
    2) Within the Loop Use the Extract Text from PDF activity. But Enable the Page to Extract by Range and use the loop index to iterate over every single Page
    3) Create an if statement that using a keyword that you know is going to be present in the first page of every invoice.
        - Within the if statement add that page index to a List.
     
    Now you have a List with the first page of every invoice. Getting the last page of the invoice will be as easy as reducing the following item in the list by 1.
     
    Now you can use that list to iterate over every element with the "Extract PDF file pages to new PDF file" action.
     
    Hope this helps! 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 64 Super User 2025 Season 1

#2
Nived_Nambiar Profile Picture

Nived_Nambiar 18 Super User 2025 Season 1

#3
CU12050101-0 Profile Picture

CU12050101-0 12

Overall leaderboard
Loading started