How to Combine PDF Files on Unix

Save

Unix users typically use the "cat" command to combine two files. However, that will not work with .pdf files. Instead, the open source programs Ghostscript and PDFtk can be used. Ghostscript is an interpreter for the Portable Document Format (PDF). PDFtk is a tool kit for merging, splitting and attaching files to PDF documents. Both software applications are command line applications but there are graphical front ends available for Ghostscript. The software is available for Unix, Linux, Mac OSX and Windows.

Things You'll Need

  • Ghostscript
  • PDFtk
  • Download and install Ghostscript and PDFtk (see Resources).

  • Open a terminal window.

  • Type the command "cd PDF_Files/" to navigate to the directory containing your .pdf files. Change "PDF_Files" to the correct directory name.

  • Type the command "gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=test.pdf -dBATCH fileA.pdf fileB.pdf" to merge the .pdf files into one file. Change "test.pdf," "fileA.pdf" and "fileB.pdf" to reflect the names of your files.

  • Type "gs test.pdf" to view the combined file.

References

  • Photo Credit BananaStock/BananaStock/Getty Images
Promoted By Zergnet

Comments

Resources

You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!