[Catalyst] Which C::View::PDF should I use?
hutchinson.chris at gmail.com
Sun Mar 7 22:06:35 GMT 2010
> Thanks for that. I've looked at various html 2 pdf tools (I used html2ps for
> a project about 10 years ago). But lack of even basic CSS support makes the
> them useless for creating "pretty" PDFs.
> In reality, this project doesn't really need PDF output (HTML would work
> fine), but $customer says it's a requirement, so I've got to make it work
> for creating "pretty" PDFs.
I've found that a simple way to put values into a PDF is to use PDF
forms - position the form fields in the appropriate location in the
template doc, and to generate the output update the form fields and
write a 'flattened' version of the doc. This means you can use visual
tools to layout the doc, and your code doesn't need to know anything
except the field names.
If you're considering non-perl tools, then iText does a pretty good
job of both creating PDF from scratch and updating PDF form fields,
and would be easy to wrap to call from a view.
chris at hutchinsonsoftware.com
Armidale, NSW, 2350, Australia
More information about the Catalyst