Am 07.03.2013 20:45, schrieb David Scott:
Thank you Andreas it works now except for the flags -startpage and -endpage.
Are they supported?
If so, what would the syntax be?
The parameter are case sensitive

... ExtractText -startPage 12 -endPage 33 ....

I tried it 2 different ways with the same result.

David

ds@ds-desktop2:~/Documents/HMSI$ java -jar /usr/share/java/pdfbox-app-1.7.1.jar
ExtractText -startpage12 -endpage33 HEM_FYE_112910_Mcal_Pd_Days.pdf hmsi10.txt
ExtractText failed with the following exception:
java.io.FileNotFoundException: -startpage12 (No such file or directory)
     at java.io.FileInputStream.open(Native Method)
     at java.io.FileInputStream.<init>(FileInputStream.java:137)
     at java.io.FileInputStream.<init>(FileInputStream.java:96)
     at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:980)
     at org.apache.pdfbox.ExtractText.startExtraction(ExtractText.java:211)
     at org.apache.pdfbox.ExtractText.main(ExtractText.java:84)
     at org.apache.pdfbox.PDFBox.main(PDFBox.java:42)

ds@ds-desktop2:~/Documents/HMSI$ java -jar /usr/share/java/pdfbox-app-1.7.1.jar
ExtractText -startpage 12 -endpage 33 HEM_FYE_112910_Mcal_Pd_Days.pdf hmsi10.txt
ExtractText failed with the following exception:
java.io.FileNotFoundException: -startpage (No such file or directory)
     at java.io.FileInputStream.open(Native Method)
     at java.io.FileInputStream.<init>(FileInputStream.java:137)
     at java.io.FileInputStream.<init>(FileInputStream.java:96)
     at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:980)
     at org.apache.pdfbox.ExtractText.startExtraction(ExtractText.java:211)
     at org.apache.pdfbox.ExtractText.main(ExtractText.java:84)
     at org.apache.pdfbox.PDFBox.main(PDFBox.java:42)

On 03/07/2013 02:17 PM, Andreas Lehmkuehler wrote:
Hi,


Am 07.03.2013 17:41, schrieb David Scott:
pdfbox

When I try to execute this pdf to text extraction command:
java -jar /usr/share/java/pdfbox-1.7.1.jar ExtractText -startpage12 -endpage33
Days.pdf days10.txt

I get:
Failed to load Main-Class manifest attribute from
/usr/share/java/pdfbox-1.7.1.jar

My knowledge of java is zero.

Can someone tell me what I need to do to use the program?
You are using the wrong jar, try pdfbox-app-1.7.1.jar instead.


Thanks,
David Scott

BR
Andreas Lehmkühler




BR
Andreas Lehmkühler

Reply via email to