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

Wes Cravens wcravens at cortex-it.com
Thu Mar 3 21:49:18 GMT 2011

On 3/3/2011 10:58 AM, Victor Churchill wrote:
> 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.

I fell into exactly this same hole earlier today in fact.  I'm not 
exactly sure why this is set in the stash rather than the template, or 
why the template setting seems to be ignored (or something). I've not 
had the time to investigate further... but from the docs...

$ perldoc Catalyst::View::PDF::Reuse
The filename and content disposition (inline or attachment) can be
controlled by putting the following values in the stash:

$c->stash->{pdf_disposition} = 'attachment';  # Default is 'inline'
$c->stash->{pdf_filename}    = 'myfile.pdf';

>> 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/

More information about the Catalyst mailing list