Sunday, January 29, 2012

Join / Merge / Combine / Concatenate PDF pages into a single PDF

There are many free (and open source) methods available.

pdfjoin / pdfjam - command line utility. Very easy to use, but has some limitations:
  • Output pages are all the same size
  • Hyperlinks are stripped
Use ghostscript to "print" all of the files into a new PDF file. With this method, you can use other ghostscript capabilities to further modify the output (such s resampling graphics, etc):
  •  gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=output.pdf input1.pdf input2.pdf
pdftk (PDF Toolkit) - yet more command line tools for PDF manipulation. There are a bunch of different styles of command line (examples can be seen on web site). The simplest is:
  • pdftk input1.pdf input2.pdf input3.pdf cat output output.pdf
  • powerful but complicated GUI to PDFtk is available 
pyPDF - a tool for the programming / python oriented. It can split, merge, watermark, rotate, and extract information with simple python scripting. There is a GTK-based GUI available called PDF-Shuffler.

PDF Split and Merge is a cross-platform java based GUI (and command line) tool.

There are more! With so many choices, how does one choose? Whim, personal preferences, scale requirements, tools and platform on hand (ease of installation/integration), or just random.






No comments:

Post a Comment