tags:

views:

64

answers:

1

I'm using Perl's PDF::API2 module to create a PDF document and I need to add an PNG image at a specific X,Y location on the page.

How do I do this?

+3  A: 

Actually I worked it out:

# grab a text object - we are missing fonts?
my $gfx = $page->gfx;

my $image = $self->pdf->image_png('/tmp/logo.png');

# add the image to the graphic object - x, y, width, height  
$gfx->image($image, 24, 815, 102, 29);