Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Trying to add an image to a pdf file using PDF::API3::Compat::API2;

by irnbruusa (Initiate)
on Jun 14, 2012 at 22:50 UTC ( #976325=perlquestion: print w/ replies, xml ) Need Help??
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
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://976325]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (20)
As of 2013-05-22 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (461 votes), past polls