Hi Maruan,

an dirty but interesting workarround i have found, but it's not a real solution. If i just read the problem-pdf with itext before and store them to an tmp-file (without any changes), then i can render the tmp-pdf with pdfbox.

BR, Manfred

Am 21.09.2015 um 12:41 schrieb Maruan Sahyoun:
Hi Manfred,

how was that document created. Has it been processed afterwards?

The reason for the issue - if I'm not mistaken is that the document contains a 
FileAttachment annotation but that is contained in the /Contents of the page 
where there should either be a single stream or an array of streams with the 
pages graphical content. A file attachment annotation should be in the /Annots 
entry of the page (which is empty in your case)

BR
Maruan

Am 21.09.2015 um 10:50 schrieb Manfred Pock <[email protected]>:


Sorry, it's just by one pdf, i have removed the correct one, the exception 
exists at

http://cloud.directupload.net/2pYC

thanks, Manfred

-------- Weitergeleitete Nachricht --------
Betreff:        ClassCastException during rendering pdf
Datum:  Mon, 21 Sep 2015 10:44:48 +0200
Von:    Manfred Pock <[email protected]>
An:     [email protected]



Hi,

i get a ClassCastException in Current 2.0-trunkversion, Java 1.8,
Windows 7, during rendering two pdfs. Is there any solution?

The Stacktrace is:

Exception in thread "AWT-EventQueue-0" 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:450)
    at
org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:437)
    at
org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:148)
    at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:179)
    at
org.apache.pdfbox.rendering.PDFRenderer.renderPage(PDFRenderer.java:208)
    at
org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:139)
    at
org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:94)

and you can download the pdf's at

http://cloud.directupload.net/2pYB
http://cloud.directupload.net/2pYC

best regarts, Manfred




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



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

Reply via email to