How to split large pdf file

I have below scenario plz help me…

I have multiple files and want to split on basis of page count those file whose file size is more than 20mb & splitting limit only 5 means suppose,
We have 100mb one file & 150 pages are present in the file. Like below,

Value:- Total file size/expected file size = 100/20=5

Per_cnt:- page count/Value = 15/5 = 3 files should get split only.

I have used if condition file size is grater than 20mb or file size is less than 100mb then need to split.

i want to use loop inside the if condition to get below output but i don’t understand how to use.

File shoule get split like:- from 1 to 5 = 1st split file
from 6 to 10 = 2nd split file
from 11 to 15 = 3rd split file

@mkankatala any solution?

1 Like

Inside the if condition,

  1. Get the page count and assign it to the variable. For e.g: 150
  2. Set the split limit in one variable. Let’ say IntSplit=5
  3. Check in if condition whether split limit is less than page count,
    then: Divide the total page count by the split limit and round of to the next integer. This is
    your split count. - 150/5=30
    else: No need to split
  4. Loop through the split count
  5. Use Extract PDF range activity and pass the page numbers dynamically
1 Like

Thanks for your response @PaviS

Can you please send me flow? for better understanding.

@Smitesh_Aher2 ,

Please try the logic shared by @PaviS . If you face any issue let us know. Happy to help.
It’s not small story to build sample workflow.

Ashok :slight_smile:

1 Like

Let us know if you faced any challenge. I can share the xaml file with you.

1 Like


check it

Hi @Smitesh_Aher2 ,

Hope this issue is resolve.