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

Tilman Hausherr commented on PDFBOX-3728:
-----------------------------------------

That file is really FUBAR. I've made some changes but this is only so that you 
don't get unchecked exceptions when rendering. Text extraction works.

> org.apache.pdfbox.cos.COSDictionary cannot be cast to 
> org.apache.pdfbox.cos.COSStream
> -------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-3728
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3728
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering, Text extraction
>    Affects Versions: 2.0.4, 2.0.5
>         Environment: Ubuntu + Windows, JRE 1.8.0 121
>            Reporter: Peter Pinnau
>         Attachments: test.pdf
>
>
> The attached PDF document produces an exception in rendering or text 
> extraction.
> Stacktrace:
> java.lang.ClassCastException: org.apache.pdfbox.cos.COSDictionary cannot be 
> cast to org.apache.pdfbox.cos.COSStream
>       at org.apache.pdfbox.pdmodel.PDPage.getContents(PDPage.java:157)
>       at 
> org.apache.pdfbox.pdfparser.PDFStreamParser.<init>(PDFStreamParser.java:92)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:485)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:469)
>       at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
>       at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:206)
>       at 
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:145)
>       at 
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:68)
>       at 
> biz.pinnau.rcp.pdf.java.PDFBoxHandler.renderCurrentImage(PDFBoxHandler.java:52)
>       at 
> biz.pinnau.rcp.pdf.SWTPDFPositionChooser$12.run(SWTPDFPositionChooser.java:403)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to