Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.19
-
None
-
None
Description
We are using the latest version of PDFBox library 2.0.19. During the conversion of test file 1904.12320.pdf (which is a valid pdf file according to https://www.pdf-online.com/osa/validate.aspx) we get an error
java.lang.ClassCastException: org.apache.pdfbox.cos.COSString cannot be cast to org.apache.pdfbox.cos.COSDictionary
I am attaching also the stack trace:
java.lang.ClassCastException: org.apache.pdfbox.cos.COSString cannot be cast to org.apache.pdfbox.cos.COSDictionary at org.apache.pdfbox.pdmodel.PDResources.getProperties(PDResources.java:353) ~[pdfbox-2.0.19.jar:2.0.19] at org.apache.pdfbox.rendering.PageDrawer.beginMarkedContentSequence(PageDrawer.java:1824) ~[pdfbox-2.0.19.jar:2.0.19] at org.apache.pdfbox.contentstream.operator.markedcontent.BeginMarkedContentSequenceWithProperties.process(BeginMarkedContentSequenceWithProperties.java:52) ~[pdfbox-2.0.19.jar:2.0.19] at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:875) ~[pdfbox-2.0.19.jar:2.0.19] at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:509) ~[pdfbox-2.0.19.jar:2.0.19] at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:483) ~[pdfbox-2.0.19.jar:2.0.19] at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:156) ~[pdfbox-2.0.19.jar:2.0.19] at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:270) ~[pdfbox-2.0.19.jar:2.0.19] at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:321) ~[pdfbox-2.0.19.jar:2.0.19] at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:243) ~[pdfbox-2.0.19.jar:2.0.19] at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:229) ~[pdfbox-2.0.19.jar:2.0.19]