[Catalyst] Fwd: Catalyst::View::PDF::Reuse generates empty PDF

Victor Churchill victorchurchill at gmail.com
Thu Mar 3 16:58:27 GMT 2011

Thank you for the reply Jorge.

On 3 March 2011 14:11, Jorge Gonzalez <jorge.gonzalez at daikon.es> wrote:
> I think INCLUDE_PATH should not include the last 'books' path part. It's
> taken from the controller name

Hm, strange. That sounds very appealing but did not seem to work for me.
In my case I found that  (after moving theconfig from MyApp.pm to
View/PDF/Reuse.pm) :
package MyApp::View::PDF::Reuse;

use strict;
use base 'Catalyst::View::PDF::Reuse';

# Configure PDF generator view
#       MyApp->path_to('root','src'),
    render_die => 1,

works with the 'books' line but not without it. <?>

However. I did get some PDF eventually! It turned out that the problem
was : I was using [% pdf.prFile ... %] at the start of the template.
Presumably the C:V:P:R code includes one of those itself and I was
causing that one to be closed.
So I have now said Hello to the world ;-)

> If your template base is root/src, the controller is Books.pm, the action id
> "pdf", the template should be in root/src/books/pdf.tt
> This works for me :-)
> regards
> J.
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/

best regards,

Victor Churchill,

More information about the Catalyst mailing list