How to merge multiple PDFs

This is post no 3 in the general software tips series.

Let’s say you have two or more PDF files lying around that you would rather they are all in one single PDF document, then you can use Ghostscript to merge your multiple PDFs.

Make sure you have Ghostscript installed (it might have been installed already if you are using a desktop environment like GNOME or KDE).

Open up a terminal and enter the following command:

gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf file1.pdf file2.pdf file3.pdf ...

In the command that we used above,

output.pdf is the merged PDF file

file1.pdf, file2.pdf and file3.pdf … are PDF files that we want to merge

Till next time, bye!.

· linux