[Catalyst] Empty pdf file/ using Catalyst::View::PDF::Reuse
Gavin Henry
gavin.henry at gmail.com
Tue Mar 9 10:12:08 GMT 2010
Hi,
I've used PDF::Reuse a lot, not with Cat though. The template should
be a PDF file and then you can write over it and output a new one. So
without checking the pod for this view is your template right?
Try it outside Cat first or using a test you've written.
Thanks,
Gavin.
On 06/03/2010, Lupin Deterd <lupindeterd at gmail.com> wrote:
> Hi,
> I'm using View::PDF::Reuse to create/generate pdf, and though it
> successfully create one but it's empty, following is code/template.
>
> -- code --
> {
> $c->stash->{list} = ['one', 'two', 'three', 'four'];
> $c->stash->{pdf_disposition} = 'attachment';
> $c->stash->{pdf_filename} = 'receipt.pdf';
> $c->stash->{pdf_template} = 'order/receipt.tt2';
> $c->detach( $c->view('PDF::Reuse') );
>
> }
>
> -- 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 %]
>
>
> Thanks in advance for any hints.
>
> lupin
>
> _______________________________________________
> 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/
>
--
Sent from my mobile device
http://www.suretecsystems.com/services/openldap/
http://www.suretectelecom.com
More information about the Catalyst
mailing list