Well, why not use HTML::Template? The name HTML template is something of a misnomer. The template need not be HTML. I use a CSS stylesheet to produce the view I want and then convert to PDF on a PC (WHole app runs on a PC). Of course there is also Template Toolkit which is, by my reading, well suited to producing all sorts of documents. There is now a PDF::Template too. PDF::Api2 is good at actually producing the PDF. Then there is HTML::HTMLDoc which is said to produce PDF from HTML but I haven't actually tried it.
A trip to your friendly local CPAN store will surely supply your needs!
Good luck jdtoronto