Skip to content

Instantly share code, notes, and snippets.

@brenopolanski
Last active May 2, 2024 06:56
Show Gist options
  • Save brenopolanski/2ae13095ed7e865b60f5 to your computer and use it in GitHub Desktop.
Save brenopolanski/2ae13095ed7e865b60f5 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.

@tanimislam
Copy link

thanks!

@Steve778845
Copy link

Thanks!

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