FyTek Forum

Full Version: Extracting all pages from one large PDF file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I'm trying to find a simple way to extract all the pages from a large PDF file into separate smaller PDF files. For example, extracting a 100 page document into 100 single page PDF files.

I can do it in my code by looping over and over, but that requires the pdfmeld.exe to run 100 times (in this example) - and it takes a long time to do the entire PDF. Is there a way to do something like this:

pdfmeld.exe large.pdf %1.pdf -kn keyname -kc keynumber -pagefmt %1

Where: %1 would be the current page, so the outputs would be page1.pdf, page2.pdf, page3.pdf, etc.

Thank you!
Try the -burst option. Something like this in your case:

pdfmeld.exe large.pdf c:\myoutput\ -kn keyname -kc keynumber -burst ""

From the documentation:
Creates one new PDF for each page in the input PDF. Pass in a file name prefix to use or leave blank to use the input file name. The output file specified on the command line must be a directory name and not a file name. The output files will have the suffix _# appended to the name where # is the page number. The page number will be prefixed with 0's if necessary so all PDFs will be the same length for the name. For example, if -burst "" is used and the input file is called mypdf.pdf containing 145 pages then the output directory will contain mypdf_001.pdf, mypdf_002.pdf and so on through mypdf_145.pdf. Only use one input file with this option.

Regards,
Mike Bernardo
FyTek, Inc.
Exactly what I needed - thank you!
why u want to extract all the pages
You can try the approved Adobe way top to split a PDF document. On the tip menu of Adobe Acrobat Professional, choose Document and then click on Extract Pages. You can extract any amount of pages with this method; along with there are other features too.
Or you try using a third party tool like PDF split tool. There are many tools available but the best tool that many people recommend is SysInfoTools PDF Split. This tool is very efficient and easy to use.
Reference URL's