b5media.com

Advertise with us

Enjoying this blog? Check out the rest of the Technology Channel Subscribe to this Feed

New Linux User

Merge multiple PDFs into one file

by Kyle on January 27th, 2007

Merged PDFs
For years I never knew how to combine multiple PDFs into one PDF file without the use of Adobe Professional. However, this can be done and can be done in Linux very very easily and of course, for free.

This process requires you to install two packages: Ghostscript and PDFtk. These packages are widely available in the repositories of your distro of choice. If you are going to install them using apt, use the following commands:

apt-get install gs

apt-get install pdftk

Alternatively, if you would rather download the packages and install them yourself, here are the links to the download pages:

Link: Ghostscript download
Link: PDFtk download

Now, open a terminal and copy and paste the following command:


gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=firstANDsecond.pdf -dBATCH first.pdf second.pdf

Change the name of first.pdf and second.pdf to the PDF files that you would like to merge, and change the name of firstANDsecond.pdf to the name you would like to name your merged pdf file. If you haven’t changed directories, the merged document will be created in your home directory.

This command allows you to merge more than just two documents. If you would like to merge three or more PDF files, continue to append the file names to the above command (separated by a space).

POSTED IN: How To

8 opinions for Merge multiple PDFs into one file

Have an opinion? Leave a comment:




Check Spelling
Activate Spell Check while Typing
Site Meter
Close
E-mail It