Tags
cli, ghostscript, gs, pdf, print
Combine pdf files:
$ gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=output.pdf pdffile1.pdf pdffile2.pdf
which combines pdffile1.pdf and pdffile2.pdf into a single ouput.pdf.
Delete certain pages of a PDF document:
$ gs -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -dFirstPage=m -dLastPage=n -sOutputFile=output.pdf input.pdf
where m and n are positive integers (page numbers), i.e. the above command only prints out pages starting from page number m through n of input.pdf into output.pdf.
Pingback: [pdf] Resize a picture in the command line using ImageMagick (convert) and save it as a PDF « *NIX Tricks
Pingback: PDF Document Page Removal - PreCentral Forums