# [Catalyst] generating and redirecting to pdfs

hkclark at gmail.com hkclark at gmail.com
Mon Oct 26 22:49:23 GMT 2009

On Tue, Oct 20, 2009 at 6:25 PM, Steve Rippl <rippls at woodlandschools.org>wr=
ote:

> Hi,
>
> I'm using TT for my View templates, and I'm experimenting with
> Template::Plugin::Latex for generating pdf reports.  Now I'm generating
> pdfs (which is nice!) but not redirecting to them at the end, so I
> suspect I'm using the wrong approach.
>
> Right now I've added OUTPUT_PATH =3D> 'root/tmp' to lib/WsdSis/View/TT.pm
> and when I hit the /report/test it using the following template (without
> a wrapper)
>
> [%
>  META no_wrapper =3D 1;
>  META title =3D 'Latex';
> -%]
> [% USE Latex(output=3D'example.pdf') -%]
> [% FILTER latex %]
> \documentclass[letterpaper]{article}
> \begin{document}
> ...LaTeX document...
> \end{document}
> [% END -%]
>
> which produces root/tmp/example.pdf but leaves me looking at a blank
> page on the screen.  I realize my view is supposed to provide the final
> view and I've redirected that way to the pdf file, is there a quick way
> to redirect to that or do I need a different approach (similar to the
> Catalyst::View::Email::Template example in the book?).
>
> Any pointers would be much appreciated...
>
> Thanks,
> Steve
>
>
> --
> Steve Rippl
> Technology Director
> Woodland Public Schools
> 360 225 9451 x326
>
>
Hi Steve,

It sounds like you probably want to stick with something that's specific to
LaTeX, so this may be of no help for you, but I thought I would pass it
along just in case.  I have recently used Jon Allen's
Catalyst::View::PDF::Reuse and found it to be excellent.  It's great for
situations where you want to have a fancy "background PDF" that you then
want to superimpose text on top of.

Jon also has a nice presentation on the package at: