You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by David Scott <da...@surf4.net> on 2013/03/07 17:41:23 UTC

Failed to load Main-Class manifest attribute

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?

Thanks,
David Scott


Re: Failed to load Main-Class manifest attribute

Posted by David Scott <da...@surf4.net>.
Thank you. That worked fine.

David

On 03/07/2013 04:20 PM, Andreas Lehmkuehler wrote:
> 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
>
>


Re: Failed to load Main-Class manifest attribute

Posted by Andreas Lehmkuehler <an...@lehmi.de>.
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


Re: Failed to load Main-Class manifest attribute

Posted by David Scott <da...@surf4.net>.
Thank you Andreas it works now except for the flags -startpage and -endpage.
Are they supported?
If so, what would the syntax be?


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
>
>


Re: Failed to load Main-Class manifest attribute

Posted by Andreas Lehmkuehler <an...@lehmi.de>.
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