in reply to Can't call method "val" on an undefined value at /usr/lib/perl5/site_perl/5.8.0/PDF/API2/Resource/XObject/Image.pm line 99

From the documentation, it doesn't look as if ->image_jpeg accepts an URL. You could check that by checking the return value:

my $imagename = "http://docs.gimp.org/images/filters/examples/color-ta +j-sample-colorize.jpg"; my $jpeg = $pdf->image_jpeg($imagename) or die "Couldn't add '$imagename' as a file.";
  • Comment on Re: Can't call method "val" on an undefined value at /usr/lib/perl5/site_perl/5.8.0/PDF/API2/Resource/XObject/Image.pm line 99
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: Can't call method "val" on an undefined value at /usr/lib/perl5/site_perl/5.8.0/PDF/API2/Resource/XObject/Image.pm line 99
by nargis (Initiate) on Apr 28, 2008 at 18:08 UTC
    Hi,
    I tried writing URl as well as direct image file, but none of them is working.