On Mon, 2007-01-08 at 09:21 -0800, Dylan Vanderhoof wrote: > I figured I'd ask here real quickly before I try to write one. > > Anybody made a Catalyst::View::PDF of some sort? It looks like I'm > going to have to be dealing with some PDF output, so I figured I'd avoid > reinventing the wheel if at all possible. I'm currently using Template::Latex, and I have written a quick and dirty hack that subclasses C::V::TT http://www.stud.uni-karlsruhe.de/~uibjk/files/TT.pm I just did not figure out how to tell C::V::TT to use Template::Latex instead of Template without doing too much copy&paste. I ended up running new() of C::V::TT and stealing the config of the Template object that has been instantiated. So, now I have a Template and a Template::Latex object, therefore I'm using the view for both purposes, depending on $c->stash->{output_pdf}. You've been warned... I would appreciate anybody proposing a cleaner solution, but it seems to work for my simple purposes;-)
If you do not like LaTeX, alternatives have been proposed in the following thread: http://lists.rawmode.org/pipermail/catalyst/2006-June/008048.html Though I do not think anyone has published a ready-to-use C::V::PDF until now. XML::ApacheFOP sound interesting (if you do not have to take care of your server resources...), and it would not be that difficult to write a C::View for it. Maybe you could even circumvent the problem by letting apache (or your webserver) do the conversion for you, your application would only serve the xml files. Sébastien > > Thanks, > Dylan > _______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
