Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Neoglyph/bd29131adc9c33034a1252e961273616 to your computer and use it in GitHub Desktop.
Save Neoglyph/bd29131adc9c33034a1252e961273616 to your computer and use it in GitHub Desktop.
Merge multiple PDFs using Ghostscript

A simple Ghostscript command to merge two PDFs in a single file is shown below:

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH 1.pdf 2.pdf

Install Ghostscript:

Type the command sudo apt-get install ghostscript to download and install the ghostscript package and all of the packages it depends on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment