[gs-devel] Splitting a multipage pdf

Jeremy Rottman rottmanj at hsmove.com
Thu Apr 2 11:36:07 PDT 2009


I know that I can split a multi-page pdf if I use something like below. 
But the issue that I am having is that I will never know exactly how 
many pages are in the pdf files that I am working with. Is there a way 
to determine the number of pages or even better is there a way to split 
the pdf with out passing the firstpage or lastpage?

Any help with this is greatly appreciated.


 gs -sDEVICE=pdfwrite \
   -q -dNOPAUSE -dBATCH \
   -sOutputFile=sample-1.pdf \
   -dFirstPage=1 \
   -dLastPage=1 \
   FAX200904010240-1.PDF


More information about the gs-devel mailing list