Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Can't locate object method "image_jpg"

by ndnalibi (Acolyte)
on Sep 11, 2008 at 15:17 UTC ( [id://710637]=perlquestion: print w/replies, xml ) Need Help??

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

I am writing a perl CGI script to create a PDF. Everything was working fine. I added some code related to fonts and now I'm getting the following error: Can't locate object method "image_jpg" via package "PDF::API2" at /var/www/cgi-bin/upl.cgi line 308., referer: http://tweak/font_test/ I'm not really looking for an answer, but more of a hint. I want to understand this.
use CGI; # load the CGI.pm module use DBI; # load database module use DBD::mysql; # load mysql driver use PDF::API2;
my $jpeg = $pdf->image_jpeg('/var/www/html/font_test/Pumpkins/backgrou +nd.jpg'); my $png = $pdf->image_png('/var/www/html/font_ +test/Pumpkins/foreground.png'); my $tag = $pdf->image_jpg('/var/www/html/font_ +test/Pumpkins/tagline.jpg');

Replies are listed 'Best First'.
Re: Can't locate object method "image_jpg"
by themage (Friar) on Sep 11, 2008 at 15:47 UTC
    Hi ndnalibi,

    You mistyped the image_jpeg method as image_jpg (missing the e) in your second call the the method, or am I missing anything?

      themage : That's correct. You didn't miss asomething. jpg ne jpeg has bit me before as well.
        Thanks so much. I guess it's true that sometimes you're too close to the problem to see the obvious.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-19 03:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found