CC: | <mdwestie [...] gmail.com> |
Subject: | Featuer or Documentation Request |
Date: | Tue, 26 Apr 2016 12:15:21 -0400 |
To: | <bug-Catalyst-View-PDF-Reuse [...] rt.cpan.org> |
From: | "Mark West" <mdwestie [...] gmail.com> |
Good morning:
I've been using your module for creating PDF documents with Catalyst,
PDF::Reuse and Template Toolkit.
I'm having trouble importing jpg images and wonder if it is implemented or
if there are any examples.
This is the code I've developed so far in TT. The page draws but no image is
displayed.
[%- pdf.prFont('HB') -%]
[%- pdf.prFontSize(10) -%]
[%- box_height = '14' -%]
[%- pdf.prFont('Calibri') -%]
[%- pdf.prFontSize(25) -%]
[% USE Image('bp01.jpg') %]
[% width = Image.width %]
[% height= Image.height %]
[%- pdf.prMbox('0','0','720','960') -%]
[%- logoFile01 = pdf.prJpeg("bp01.jpg", $width, $height) -%]
[%- string = 'q ' _ width _ ' 0 0 ' _ height _ ' 0 960 cm ' _ logoFile01 _
'Do Q' -%]
[% pdf.prAdd(string) %]
[%- INCLUDE 'components/box.tt' string=width align=right x=295 y=635 w=260
h=20 -%]
[%- INCLUDE 'components/box.tt' string=logoFile01 align=right x=295 y=605
w=260 h=20 -%]
[%- INCLUDE 'components/box.tt' string=string align=right x=235 y=575 w=260
h=20 -%]
The only difference I see in the pure perl documentation and examples is
that they seem to escape the variable logoFile01.
So it looks like:
my $str = "q\n";
$str .= "$width 0 0 $height 10 10 cm\n";
$str .= "/$intName Do\n";
$str .= "Q\n";
Any thoughts or help would be appreciated.
Thanks for providing this module.
Mark West