clanrbr has asked for the wisdom of the Perl Monks concerning the following question:
I've used Imager::QRCodemy $pdf=PDF::API2->open("$data/$pdfsource"); y $page = $pdf->openpage('1'); my $gfx=$page->gfx();
And i want to write in the pdf without saving in on the hard so i've tried something like this :my $qrcode = Imager::QRCode->new( size => 8, margin => 1, version => 1, level => 'M', casesensitive => 1, lightcolor => Imager::Color->new(255, 255, 255), darkcolor => Imager::Color->new(0, 0, 0), ); my $img = $qrcode->plot("$mylink"); $img->write(data => \$result, type => 'png') or die 'Cannot save \'png\': ', $img->errstr;
I think it doesn't recognize it as picture and can't read the metadata. The following error is an't call method "val" on an undefined value at /usr/local/lib/perl5/site_perl/5.8.9/PDF/API2/Resource/XObject/Image.pm line 66 Thank you and waiting for ideas. Best regards.my $png1 = $pdf->image_png($result); $gfx->image($png1 ,590,140,7); my $png2 = $pdf->image_png($img); $gfx->image($png2 ,590,140,7);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PDF::API2 and Imager
by zentara (Cardinal) on Aug 29, 2012 at 16:30 UTC | |
|
Re: PDF::API2 and Imager
by philiprbrenan (Monk) on Aug 29, 2012 at 14:11 UTC |