Saturday, July 16, 2011

Merging PDF files on Linux

There are many tools out there. gs is one of such command line tools to achieve this. Suppose there are two pdf files as file1.pdf and file2.pdf and we want to merge them into final.pdf, then the command will be -
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=final.pdf file1.pdf file2.pdf

More than two pdf can also be merged by providing their names in the command line argument.

No comments:

Post a Comment