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
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.
- Photo Credit BananaStock/BananaStock/Getty Images
How to Open a PDF File From the Command Line in Ubuntu
Although Adobe's own Reader for Linux is no longer supported or updated, Ubuntu users can call on a number of other programs...
How to Read PDF Files in Unix
The Portable Document Format (PDF) is a file format that creates a two dimensional document that has the images, fonts and text...
How to Merge PDF Files in Windows
Portable Document Format (PDF) is a widely used format for finalized electronic documents, interactive forms and documents that are going to be...