Page 1 of 1

Split PDF by filesize of the resulting single-PDF

Posted: Mon Oct 20, 2014 12:05 pm
by CSchulmeyer
Hi,



is there any possibility to split an incoming PDF-File by filesize of the resulting single-PDF-files, such as you can do with an Desktop-Version aof Acrobat Pro?



I checked out several configurators --> SplitPDF, pdfToolbox-Actions, Acrobat itself, but all of them can only split an PDF by number of pages.



Thanks for your help,

Christian

Split PDF by filesize of the resulting single-PDF

Posted: Mon Oct 20, 2014 5:24 pm
by freddyp
Let me guess what you want to do. You want PDF files that are smaller than eg 5MB, but you do not care how many pages there are in the file. The only way to do this reliably is to split the PDF and reassemble the pages based on the sum of the individual file sizes not exceeding a certain limit.



I can think of a way to do this in Switch without using a script, but it would mean that it would take as many minutes as there are parts to the PDF file because of the minimum time interval of "Assemble job" being 1 minute.



The quickest way is to use a script. The scripts gets a folder with PDF's as input (the result of "Split PDF") and it outputs multiple folders with a varying amount of PDF's and these output folders can then be merged with the "Merge PDF" tool.



Can you tell me what tool you know that can split a PDF file in this way?



Freddy

Split PDF by filesize of the resulting single-PDF

Posted: Mon Oct 20, 2014 6:26 pm
by dkelly
I've written a script to do this; however, the difficulty is if you look at the size of the individual split pages you will not get the results you expect.



For example, I split a PDF with 800 pages into individual pages, group them into 5MB segments and then merge each segment into a PDF I will not get PDF files sized to 5MB. Each split PDF will have it's own copy of any fonts, images, colorspaces, etc. When merging them together a good PDF library will automatically get rid of duplicate resources. A really good PDF library will merge subset fonts also.



So your 5MB segment may end up only be 1MB or less in size.



Dwight Kelly

Apago, Inc.