Handling PDF files with pdftk

In the morning I had to give a documents for arrange a student exchange scholarship, however, it was necessary deliver beside original papers, two copies plus a digital file. But I had a problem, because two formats were outdated and besides that I was missing , therefore my pdf-scanning was useless 😦

Had I to scan all files again? No 🙂 Afortunately there are open source tools for manipulating PDF files. More especifically: There is pdftk.

The instalation really is easy in debian systems: sudo aptitude install pdftk

Splitting files

My first challenge was to remove certain pages of the original pdf file, precisely: page 2 to 3, page 5 to 6 and page

$ pdftk my-old-file.pdf cat 1 4 7-end output my-new-file.pdf

Merging files

Now I was needing to insert the new formats in my document main, precisely: new-format.pdf inserted in page 3:

$ pdftk my-old-file.pdf cat 1-2 output a.pdf
$ pdftk my-old-file.pdf cat 3-end output c.pdf
$ pdftk A=a.pdf B=insert.pdf C=c.pdf cat A B C output final.pdf

Rotating a page

Other problem was that the page 38 was headfirst :O, the solution was:

$ pdftk final.pdf cat 1-37 38S 39-end output final2.pdf

But if you can make more interesting things with pdftk. You can check the oficial web-site

And finally I get my file without to scan again. Now I will wait a successful answer for my petition 🙂


Un comentario sobre “Handling PDF files with pdftk


Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión /  Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )


Conectando a %s