pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hesham G." <heshamgne...@gmail.com>
Subject Re: Error when extracting PDF
Date Thu, 02 Jun 2011 03:35:48 GMT
Mohit ,

This is out of scope of your question, but I hope you can explain to me what 
Tika does exactly ?
I have read its description and it is useful in text extraction, but I still 
do not understand what additions does it give ? Why don't you directly use 
PDFBox ?


Best regards ,
Hesham

---------------------------------------------
Included message :


> I am using Apache Tika .8 and tried .9 which is using pdfbox 1.4. It's
> throwing this error:
>
> Caused by: java.lang.NumberFormatException: For input string: "0/NUL"
>        at 
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
>        at java.lang.Integer.parseInt(Integer.java:458)
>        at java.lang.Integer.parseInt(Integer.java:499)
>        at 
> org.apache.pdfbox.pdmodel.font.PDFont.getEncodingFromFont(PDFont.java:830)
>        at 
> org.apache.pdfbox.pdmodel.font.PDFont.determineEncoding(PDFont.java:293)
>        at 
> org.apache.pdfbox.pdmodel.font.PDFont.&lt;init&gt;(PDFont.java:178)
>        at 
> org.apache.pdfbox.pdmodel.font.PDSimpleFont.&lt;init&gt;(PDSimpleFont.java:79)
>        at 
> org.apache.pdfbox.pdmodel.font.PDType1Font.&lt;init&gt;(PDType1Font.java:139)
>        at 
> org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:109)
>        at 
> org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:76)
>        at 
> org.apache.pdfbox.pdmodel.PDResources.getFonts(PDResources.java:115)
>        at 
> org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:243)
>        at 
> org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:225)
>        at 
> org.apache.pdfbox.util.PDFTextStripper.processPage(PDFTextStripper.java:441)
>        at 
> org.apache.pdfbox.util.PDFTextStripper.processPages(PDFTextStripper.java:365)
>        at 
> org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:321)
>        at org.apache.tika.parser.pdf.PDF2XHTML.process(PDF2XHTML.java:56)
>        at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:89)
>        at 
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:197)
>        ... 26 more
>
> So For the same doc I tried command line:
>
> java -jar pdfbox-app-1.4.0.jar ExtractText -console
>
> and that works. So I am not sure why one works and not the other and
> how to resolve this issue.
> 

Mime
View raw message