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
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|