gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH \ -sOutputFile=output.pdf \ input1.pdf \ input2.pdf \ input3.pdf
Tip: concatenating PDF files with Ghostscript
A small tip mostly used as a reminder to myself. Ghostscript can be used to concatenate PDF files the following way.
-
The sDEVICE option tells gs to generate a PDF instead of sending the output to the printer.
-
The dNOPAUSE and dBATCH options tell gs to be noninteractive.
-
The sOutputFile option does the obvious.
-
The positional arguments are the input files.
Load comments