Merging PDF Files

From CS Support Wiki
Revision as of 13:36, 10 March 2009 by Dlg5u (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

You can use ghostscript to combine PDF files by using the following script in a cmd line:

    gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=merged.pdf  test1.pdf test2.pdf test3.pdf
  • gs: starts Ghostscript
  • -q: stops Ghostscript from displaying messages
  • -dNOPAUSE: continues to process the script without requesting confirmation
  • -dBATCH: exits Ghostscript after merging the PDF files
  • -sDevice=pdfwrite: Ghostscript uses the built-in PDF writer
  • -sOutputFile=merged.pdf: Ghostscript saves the PDF file. Change merged.pdf to what you want the merged document to be named.
  • test1.pdf, test2.pdf and test3.pdf: the names of the pdf files that you would like to merge.