Popular Posts

Tuesday, February 17, 2009

Adding PDF headers, footers, and watermarks in GNU/Linux

Recently I needed to add a header/footer to an existing PDF file. With some help from this link, I figured it out:

First, use OpenOffice.org Writer (for example) to generate a single-page PDF file that has the needed header/footer/watermark.

Second, use pdftk's background option. Quoting from the man page of pdftk:

pdftk in.pdf background back.pdf output out.pdf

the back.pdf is the file you created that has the needed header/footer/watermark. The in.pdf is the file you need to apply header/footer/watermark to. The result, of course, is saved into out.pdf.

You can also use the dual option stamp instead of background. This will overlay the back.pdf on top of every page of in.pdf.


jobs in sales said...

very good article

BioEng Student said...

Two points of follow-up, there is a very nice GUI front-end to pdftk under Windows: PDFTK Builder

Also, there is a very interesting HowTo here about adding page numbers:


Shashi said...

Many thanks for the post! It helped me a great deal. :)

Tomek said...

thank you! this was exactly what I needed!

Tanika Co Valda said...

Great Article
Machine Learning Projects for Students
Final Year Project Centers in Chennai