Showing posts with label ghostscript. Show all posts
Showing posts with label ghostscript. Show all posts

Friday, April 24, 2009

How to merge or combine PDF files with Ghostscript

Ghostscript is an interpreter for the PostScript language and for PDF.

To merge or combine two or more PDF files, presuming that gswin32 (for Windows) or gs (for Linux) is in path,

For Windows


gswin32 -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf 
-dBATCH file1.pdf file2.pdf file3.pdf

For Linux


gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf 
-dBATCH file1.pdf file2.pdf file3.pdf