Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jun 2010 11:48:23 -0400
From:      Nathan Vidican <nathan@vidican.com>
To:        John Almberg <jalmberg@identry.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Add watermark to PDF
Message-ID:  <AANLkTinujQXiZMHVa5sSgTxWzRgGuOTDK7T-JQml7rPA@mail.gmail.com>
In-Reply-To: <4C0515F3.7060006@identry.com>
References:  <4C0515F3.7060006@identry.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 1, 2010 at 10:15 AM, John Almberg <jalmberg@identry.com> 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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe@freebsd.org"
>

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
webserver.

I use PDF::Reuse Perl module to do it, it's well documented/supported and
very easy to work with. See:
http://search.cpan.org/~larslund/PDF-Reuse-0.35/Reuse.pm<http://search.cpan.org/%7Elarslund/PDF-Reuse-0.35/Reuse.pm>;
for further details.

-- 
Nathan Vidican
nathan@vidican.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinujQXiZMHVa5sSgTxWzRgGuOTDK7T-JQml7rPA>