A great tool for dealing with pdfs is pdftk. It is a toolbox of the command line, which is able to split, merge, rotate, password-protect, change metadata, apply background and some more. I use it in combination with latex, which gives me some nice pdfs, which i want to merge in various ways. There is a way of including pdfs right into latex, but that’s not something latex is really good at. I also used it to split a serial letter longer than a page. I was able to print the serial letter of Microsoft Word just in one large pdf where all letters were included and with a script of pdftk i could cut them in separated files. pdftk is open source and available for Windows and Linux also Mac.

some examples:

merge pdfs in the sequence they appear

pdftk a.pdf b.pdf c.pdf cat output abc.pdf

the command for splitting some sites is

pdftk input.pdf cat 1-4 output pages_1-4.pdf

see the excellent man page for more!

PDF version and embedded fonts

If you need information about the PDF version or the embedded fonts in a .pdf file, you can use the commands pdfinfo and pdffontsrespectively. Information pdftk’s dump_data does not provide at the moment. Both are part of xpdf.


Author: Stefan Schwaha


Leave a Reply