irnbruusa has asked for the wisdom of the Perl Monks concerning the following question:

I am new to perl and am using PDF::API3::Compat::API2 to generate a PDF. All the text gets generated fine. I just want to add images, but I am not sure how to do this

I am trying using the following, but it never gets added to the pdf document

my $image = $pdf->image_png("myimage.png" ); $pdf->page( $image->width, $image->height ); #$page->image( $image, 0, 0 );
  • Comment on Trying to add an image to a pdf file using PDF::API3::Compat::API2;
  • Download Code

Replies are listed 'Best First'.
Re: Trying to add an image to a pdf file using PDF::API3::Compat::API2;
by Anonymous Monk on Jun 14, 2012 at 23:24 UTC
    fyi, PDF::API3 doesn't appear to be maintained. and its documentation states it's the "beginning of a rewrite", so it's not expected to be complete. stick with PDF::API2 or give CAM::PDF a try.

      thanks will do.