[ 
https://issues.apache.org/jira/browse/PDFBOX-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838268#action_12838268
 ] 

Villu Ruusmann commented on PDFBOX-595:
---------------------------------------

I tried text extraction with PDFBox 1.0.1-SNAPSHOT and got the following 
exception instead:

Exception in thread "main" java.io.IOException: Not a number: -
        at org.apache.pdfbox.cos.COSNumber.get(COSNumber.java:100)
        at 
org.apache.pdfbox.pdfparser.PDFStreamParser.parseNextToken(PDFStreamParser.java:255)
        at 
org.apache.pdfbox.pdfparser.PDFStreamParser.parse(PDFStreamParser.java:101)
        at org.apache.pdfbox.cos.COSStream.getStreamTokens(COSStream.java:119)
        at 
org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:235)
        at 
org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:207)
        at 
org.apache.pdfbox.util.PDFTextStripper.processPage(PDFTextStripper.java:367)
        at 
org.apache.pdfbox.util.PDFTextStripper.processPages(PDFTextStripper.java:291)
        at 
org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:247)
        at 
org.apache.pdfbox.util.PDFTextStripper.getText(PDFTextStripper.java:180)

> extracted text contains character names instead of the characters themselves
> ----------------------------------------------------------------------------
>
>                 Key: PDFBOX-595
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-595
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Text extraction
>    Affects Versions: 0.8.0-incubator
>            Reporter: Godmar Back
>         Attachments: scansoftbugtestcase.pdf
>
>
> PDF files created by ScanSoft PDFCreate! aren't properly extracted.
> For instance, this code:
> BT
> 0 0 0 rg
> 0 Tc 0 Tw /F1 12 Tf
> 1 0 0 1 42 739  Tm
> [(T)hi)s)1(i)s)1(a)6(t)(e)(s))2(P)(D)F)4(c)(r))(a)(t)(e)(d)0(w)i)t)(h)0(S)c)(a)(ns)of))2(P)(D)F)C)r))(a)(t)(e)(!))s)1(pr))nt)(e)r)7(dr))ve)(r)7(f)r)m)2(a)6(.ht)(m)l)2(f))
> 1 0 0 1 438 739  Tm
> [(l)e)6(vi)e)(w)e)(d)0(i)n)0(F)i)r))(f)x)0(on)
> 1 0 0 1 42 725  Tm
> [(W)(i)ndow)s)1(X)P)(.)0(T)oda)y)0(i)s)1(01/)(07/)(2010.)
> ET
> is extracted as:
> This is a test PDF created with Scansoft PDFCreate!'s printer driver from a 
> .html file viewed in Firefox on
> Windows XP. Today is zero1slashzero7slashtwozero1zero.
> pdftotext (Poppler) extracts:
> This is a test PDF created with Scansoft PDFCreate!'s printer driver from a 
> .html file viewed in Firefox on Windows XP. Today is 01/07/2010.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to