From owner-freebsd-questions@FreeBSD.ORG Tue Jun 1 15:56:07 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAB391065678 for ; Tue, 1 Jun 2010 15:56:07 +0000 (UTC) (envelope-from nvidican@m2.vidican.com) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8AB2F8FC17 for ; Tue, 1 Jun 2010 15:56:07 +0000 (UTC) Received: by wwb22 with SMTP id 22so1435875wwb.13 for ; Tue, 01 Jun 2010 08:56:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.85.10 with SMTP id t10mr5568492wee.12.1275407303611; Tue, 01 Jun 2010 08:48:23 -0700 (PDT) Sender: nvidican@m2.vidican.com Received: by 10.216.136.9 with HTTP; Tue, 1 Jun 2010 08:48:23 -0700 (PDT) X-Originating-IP: [136.1.1.102] In-Reply-To: <4C0515F3.7060006@identry.com> References: <4C0515F3.7060006@identry.com> Date: Tue, 1 Jun 2010 11:48:23 -0400 X-Google-Sender-Auth: ltazMjtbJ4Ykm-SI6MU_ieOdobQ Message-ID: From: Nathan Vidican To: John Almberg Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: Add watermark to PDF X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2010 15:56:08 -0000 On Tue, Jun 1, 2010 at 10:15 AM, John Almberg 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 for further details. -- Nathan Vidican nathan@vidican.com