Server side PDF manipulation and creation

Scott Penrose scottp at
Mon Mar 22 16:52:21 CST 2004

Hash: SHA1

On 23/03/2004, at 2:27 AM, ADFH wrote:

> I've used iText in a Java environment before to create and manipulate
> existing PDFs. I was curious on similar solutions in Perl.
> Some of the things I stumbled across in CPAN seemed a little primitive
> in comparison, but perhaps I didn't delve far enough.
> What have people done with their PDF tools?
> Any caveats?
> Primary purpose in this case is to provide customised application forms
> etc. to clients from a website.

We do all our work in XML. So after creating a certain thing we then 
use XSLT (via XML::LibXSLT) to convert that to XHTML, WML or FO. Once 
it is in FO (which is like PostScript - a layout language) - it can be 
converted to PDF or SVG (or others) with FOP. FOP itself is a Java 
external app that we call.

The advantage of doing it this way rather than PDF specific, is that we 
only have one place to change out output type - thus we don't have to 
deal with someone changing from PS -> PDF -> SVG -> PNG -> ... - we 
just change the one place and all the code all over the place that 
creates the XML does not change.

Of course this is more of a pipeline approach.

If the JavaTools are good and there is not in Perl - consider using 
Inline::Java - it is REALLY easy to use, and then the methods (for most 
Java Class) are then just available to you in Perl. The only down side 
is that you instantiate a Java Interpreter - which is ok unless you 
need to be pure perl environment.

- -- 
Scott Penrose
Open source developer
scottp at

Dismaimer: Open sauce usually ends up never coming out (of the bottle).

Please do not send me Word or PowerPoint attachments.
Version: GnuPG v1.2.3 (Darwin)


More information about the Melbourne-pm mailing list