Join PDF files in linux

20 October 2009 at 1:00 PM | Posted in GNU/Linux cli | Leave a comment

Hello linux users: in this post i will show how to join two or more PDF files into one. You have to install the Ghostscript driver to do that, typing in a terminal(is for Debian and Ubuntu):

apt-get install gs
apt-get install pdftk

Now we join the PDFs with this command:

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=unidos.pdf  file1.pdf  file2.pdf

Here is the explanation of command:
gs: Call to the Ghostscript program.
-dBATCH: Close the Ghostscript when terminate the process.
-dNOPAUSE: Dont pause the program to aks for user interaction.
-q: Dont show messages during the process.
-sDEVICE=pdfwrite: Use Ghostscript PDF generator to do the process.
-sOutputFile=unidos.pdf: The name of the result file.

You can also join all PDF files in a directory typing *.pdf.

About these ads

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: