Split a PDF in multiple files, based on a given number of pages


I have run into a new issue i can’t figure out. I have a large pdf, with 2000 pages and i want to split it into multiple files, each 10 pages long. I tried with the PDF activities, but i’m clearly doing something wrong at some place.

As always, a hint is sufficient to set me in the right direction (i can also learn more:D) so any help is appreciated

Thank you,

How did you try to achieve it, by using Extract PDF page range?
What kind of problem are you facing?

the problem i’m facing is that i’m not sure how to use the PDF page range correctly - it only extracted the first 10 pages - that’s why i’m sure i’m doing something wrong.

the thing is, that it would be helpful to have the range dinamic, in increments of 10, so i don’t have to write all down.

Oh, alright! I get it know.

In this case I think you would need to get the total number of pages in the PDF.
Then split this number by 10 and round it up: you got 78 pages, so you’ll end up with the number 8.

Then create a loop, you can use the While activity and loop while your control variable (initialized with 0) is smaller than 8.

With this loop created, you just use some variables to calculate the beggining and ending of each range according to the current value of your control variable and use the extract to pdf activity with this dynamic ranges.

I didn’t develop the full logic but I think this may give you a clearer path.

Good luck!

Hi @Cristian_Ionita,

There are few packages available in the UiPath Marketplace which splits PDF files are per your requirement.

Here are some of the packages,

  1. Split a PDF file - RPA Component | UiPath Marketplace
  2. BalaReva PDF Activities - RPA Component | UiPath Marketplace
  3. PDF.co - Activities for PDF Documents - RPA Component | UiPath Marketplace

And also, with the default UiPath PDF Activity also you can perform the same task and the reference video is the below one.

I hope you’re issue would be resolved.


1 Like

Thank you thank you - I’ll try both versions tomorrow and let you know.

have a nice evening

1 Like

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