Sunday, June 26, 2011

merging pdf files on the command line

The following is handy when you need to merge several pdf files in Linux:

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=firstANDsecond.pdf -dBATCH first.pdf second.pdf

The inputs are first.pdf, second.pdf (there can be arbitrarily many of these); the output is firstANDsecond.pdf.

No comments:

Post a Comment