Today I had to merge multiple PDFs into a single PDF and had no clue on how to do it. It was fairly easy to find out how to do it and I decided to share it. First you have to install two programs
sudo apt-get install gs sudo apt-get install pdftk
Then you just have two open a console and run the following command
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=resulting_file.pdf -dBATCH file1.pdf file2.pdf file3.pdf
And that’s just it. You can change the final document’s name from “resulting_file.pdf” to whatever you want and add as many files as you want to be merged into a single PDF.
Did you find this post helpful? Do you wish to contribute to other projects regarding computer science, electronics, robotics or mechatronics that will be posted in this blog? If you wish to do so, you can donate via paypal using the button below. Thanks! 🙂