Linux: Merging two or more pdf files into one, by using ghostscript

PHOTO EMBED

Sun Aug 28 2022 02:06:51 GMT+0000 (UTC)

Saved by @marcopinero #bash

#Merge file1.pdf and file2.pdf into merged.pdf:

$> gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf file1.pdf file2.pdf
content_copyCOPY

To use this command, ghostscript utility must be installed: sudo apt-get install ghostscript (ubuntu and other debian based)