Azimout's Linux weblog

merge pdf files

with 3 comments

I recently downloaded (I don’t remember where from) the free e-book “Linux Kernel in a Nutshell”, which comes in a series of 22 pdf files. After chapter 5 I got tired of closing a pdf and opening the next one, so I decided to see if I could merge all of them into one.The tool I chose was pdftk. To get them in the right order I chose to write a script for it and test it out until it was perfect. The final result is this:

pdftk \
title.pdf colo.pdf ch00.pdf \
part1.pdf ch01.pdf ch02.pdf ch03.pdf ch04.pdf ch05.pdf ch06.pdf \
part2.pdf ch07.pdf ch08.pdf \
part3.pdf ch09.pdf ch10.pdf ch11.pdf \
part4.pdf appa.pdf appb.pdf \
cat output 'linux kernel in a nutshell.pdf'

Powered by ScribeFire.


Written by azimout

14/02/2008 at 16:47

Posted in Howto

3 Responses

Subscribe to comments with RSS.

  1. i downloaded it here:


    17/03/2008 at 17:22

  2. To rotate pages 3-7 of a 7-page document, do:
    pdftk input.pdf cat 1-2 3-endE output output.pdf


    04/09/2009 at 08:57

  3. If you want to do this in a GUI fashion, try jPDFtweak:


    05/04/2013 at 13:42

Leave a Reply

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: