Can't recommend this FORM->DATA->HTML->PDF chain! Better use something like PDF::Reuse with a templating system to generate PDF directly from the DATA. The templatingsystems don't force you to only generate HTML!
UPDATE: In the case of PDF::Reuse you can even skip the templatingsystem, but if you insist to do so, you'll generate perl-code out of templates which have to be executed afterwards.