I am trying to use an executable file peftotext to change a pdf file to a text format ,but I don't know why it doesn't work .and by the way ,I am a new learner,I just don't know "-raw" means what.Thanks a lot!
#printf("hi, this is perl pdf_extractor1.\n");
$filename1 = $ARGV[0];
#printf("hi, this is FILENAME $filename1.\n");
$filename1 =~ s/\.pdf|\.PDF/\.txt/;
#printf("1, this is FILENAME $filename1.\n");
system("./xpdf-2.01/xpdf/pdftotext -raw $ARGV[0]");
then ,I tried to run the pdftotext directly under shell ,it turned out i have to move into the directory where the pdftotext file is in ,can I make it successfully.I am confused:(
yao@ubuntu:~/perl$ xpdf-2.01/xpdf/pdftotext 1.pdf
bash: xpdf-2.01/xpdf/pdftotext: Permission denied
yao@ubuntu:~/perl$ xpdf-2.01/xpdf/pdftotext 2.pdf
bash: xpdf-2.01/xpdf/pdftotext: Permission denied
yao@ubuntu:~/perl$ cd xpdf-2.01
yao@ubuntu:~/perl/xpdf-2.01$ cd xpdf
yao@ubuntu:~/perl/xpdf-2.01/xpdf$ pdftotext /home/yao/perl/1.pdf