[Catalyst] Template::Latex in Catalyst

Yves Räber yraber at mailup.net
Wed Nov 8 18:33:09 GMT 2006


Hi,

I'm trying to use Template::Latex to create PDF files.

My code looks like this :

    use Template::Latex;

    my $tt = Template::Latex->new({
        INCLUDE_PATH  => '/templates',
        OUTPUT_PATH   => '/tmp/pdf'
        LATEX_FORMAT  => 'pdf',
    });

    my $vars = {
        title => 'Hello World',
    }
    my $output;

   $tt->process('example.tt2', $vars, \$output, binmode => 1)
      || die $tt->error();

This works fine in a standalone application, but when I copy this code into by
Catalyst Controller it behaves otherwise, there is no output at all, and no
error or warning message even when using Template debug options (the $output
variable keeps empty)

I also tried with a filename in the third parameters of the 'process' method
and I get the same result : works fine in standalone application (I get my
nice PDF in the output path), but no file gets created when run in the
catalyst controller.

Maybe I'm missing something really obvious, but right now I have no idea what
to do to make it work.

Did anyone tried to do the same thing with success ?

Thank you.Catalyst at lists.rawmode.org

Yves Raber




More information about the Catalyst mailing list