[Catalyst] Empty pdf file/ using Catalyst::View::PDF::Reuse

Charlie Garrison garrison at zeta.org.au
Wed Mar 10 05:36:38 GMT 2010


Good afternoon,

On 6/03/10 at 4:51 PM +0800, Lupin Deterd 
<lupindeterd at gmail.com> wrote:

>I'm using View::PDF::Reuse to create/generate pdf, and though it
>successfully create one but it's empty, following is code/template.
>-- template/receipt.tt2 --
>
>[% pdf.prFont('Helvetica-Bold') %]
>[% pdf.prFontSize(50) %]
>
>
>[% y = 500 %]
>[% FOREACH item IN list %]
>[% pdf.prText(100,y,item) %]
>[% y = y - 13 %]
>[% END %]

Try printing something other than `item`, eg. just a simple 
scalar "test value", to ensure you're not simply printing blank values.

Also, try ending with pdf.prPage(). I was having problems with 
blank PDFs and that may have fixed it; I can't recall exactly, I 
tried heaps of methods before getting it all working right with 
multi-page PDFs.


Charlie

-- 
    Ꮚ Charlie Garrison ♊ <garrison at zeta.org.au>
    〠 PO Box 141, Windsor, NSW 2756, Australia

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
http://www.ietf.org/rfc/rfc1855.txt



More information about the Catalyst mailing list