ruby@ruby-Z87X-HD3:~$ sudo apt-get install libpdf-api2-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
libpdf-api2-perl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ruby@ruby-Z87X-HD3:~$ PDF::API
PDF::API: command not found
ruby@ruby-Z87X-HD3:~$ PDF::API2
PDF::API2: command not found
and then I use it in perl, it still does not work! I think I will be crazy about it
ruby@ruby-Z87X-HD3:~$ perl perl.pl
Can't locate object method "new" via package "PDF::API2" (perhaps you forgot to load "PDF::API2"?) at perl.pl line 1.
i have use it like this
use PDF::API2;
#
$pdf = PDF::API2->new;
$pdf = PDF::API2->open('some.pdf');
$page = $pdf->page;
$page = $pdf->openpage($pagenum);
$img = $pdf->image('some.jpg');
$font = $pdf->corefont('Times-Roman');
$font = $pdf->ttfont('TimesNewRoman.ttf');
ruby@ruby-Z87X-HD3:~$ perl perl.pl
Can't locate object method "image" via package "PDF::API2" at perl.pl line 7.----------
i have download a pdf file and changed it name called some.pdf, but it also did not work
PDF::API
in command line and not in an EDITOR why? start reading here: https://docs.google.com/viewer?url=http%3A%2F%2Fblob.perl.org%2Fbooks%2Fbeginning-perl%2F3145_Chap01.pdf ;) – Rinzwind Jan 29 '14 at 18:39perl.pl
is clearly a script that you wrote, but without seeing it we can't tell you what's wrong. Please add the script's contents to your question :) – roadmr Jan 29 '14 at 18:39$pdf = PDF::API2->new; $pdf = PDF::API2->open('some.pdf'); $page = $pdf->page; $page = $pdf->openpage($pagenum); $img = $pdf->image('some.jpg'); $font = $pdf->corefont('Times-Roman'); $font = $pdf->ttfont('TimesNewRoman.ttf'); ruby@ruby-Z87X-HD3:~$ perl perl.pl Can't locate object method "image" via package "PDF::API2" at perl.pl line 7. i have downloaded a pdf file and changed the name called some.pdf
– ruby youngh Jan 30 '14 at 02:33