PDF::API2

PDF::API2

am 10.01.2006 20:13:50 von Kevin Luff

Hi,
I've just started working with the PDF::API2 module.

I can make a PDF with text, draw boxes and circles - but I cannot figure
how to use the image methods to insert a jpeg for example.....

Anybody know how???

Kevin

Re: PDF::API2

am 12.01.2006 19:19:35 von nobull67

Kevin Luff wrote:
> Hi,
> I've just started working with the PDF::API2 module.
>
> I can make a PDF with text, draw boxes and circles - but I cannot figure
> how to use the image methods to insert a jpeg for example.....
>
> Anybody know how???

Just grabbing a few lines from one of my programs...

my $page = $pdf->page;
#.....

my $img=$pdf->image_jpeg($jpeg_file);
my $gfx=$page->gfx;
$gfx->image($img,$x,$y,$w,$h);