Add watermark to PDF

Nathan Vidican nathan at
Tue Jun 1 15:56:08 UTC 2010

On Tue, Jun 1, 2010 at 10:15 AM, John Almberg <jalmberg at> wrote:

> I've just spent a couple hours googling for an answer to this question
> without success... This is probably a bit off topic, but this list seems to
> be able to come up with answers to questions that stump other lists, so...
> I would like to add a customized footer (a stamp or watermark) to an
> existing PDF, like the guys at Pragmatic Programmers do with their PDFs.
> So basically this script would have to read in the PDF and (ideally) a
> plain text file, and output a PDF with the plain text merged into the PDF as
> a footer.
> Anyone know of an existing utility that might do something like this?
> Probably not, so anyone know of a PDF library that I could use to roll my
> own? I'm competent in Perl, PHP, and Ruby, and at this point, would be
> willing to learn Sanskrit if it could solve this problem for me.
> Unfortunatley, I've never done any PDF programming, so not quite sure where
> to start.
> Any ideas, much appreciated.
> -- John
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe at"

I do something very similar, using PDF file as a template and mysql database
as input and filling in form-fields and also adding a JPEG to the bottom of
the page as a 'produced by' with some plain text also adding the 'generated
on' tag to the bottom. I use a simple wrapper script written in PERL as a
cgi script - basically to generate dynamic PDF reports on the fly via

I use PDF::Reuse Perl module to do it, it's well documented/supported and
very easy to work with. See:<>
for further details.

Nathan Vidican
nathan at

More information about the freebsd-questions mailing list