1.Install “ghostscript” and “pdftk”:
apt-get install gs pdftk
2.Combile files with the following command:
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=output.pdf -dBATCH input1.pdf input2.pdf
Here “output.pdf” is the name of the new output file, and “input1.pdf” , “input2.pdf”, etc., are the files to be combined.1.安装好 ghostscript 和 pdftk 这两个软件:
1.安装ghostscript和pdftk:
apt-get install gs pdftk
2.合并:
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=output.pdf -dBATCH input1.pdf input2.pdf
其中output.pdf是要生成的pdf文件。input1.pdf和input2.pdf是要合并的文件,可以更多。按照input.pdf的顺序合并。