Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.11
-
None
Description
java.lang.ArrayIndexOutOfBoundsException: 0
org.apache.pdfbox.pdmodel.graphics.color.PDDeviceGray.toRGB(PDDeviceGray.java:69)
org.apache.pdfbox.rendering.PageDrawer.getPaint(PageDrawer.java:308)
org.apache.pdfbox.rendering.PageDrawer.getStrokingPaint(PageDrawer.java:617)
org.apache.pdfbox.rendering.PageDrawer.strokePath(PageDrawer.java:682)
org.apache.pdfbox.contentstream.operator.graphics.StrokePath.process(StrokePath.java:36)
org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:853)
org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:506)
org.apache.pdfbox.contentstream.PDFStreamEngine.processTilingPattern(PDFStreamEngine.java:403)
org.apache.pdfbox.rendering.PageDrawer.drawTilingPattern(PageDrawer.java:283)
The cause is
/CS2 CS /P2 SCN
The first line sets a pattern colorspace (its entry is [Pattern DeviceGray]), the second line sets an "uncolored tiling pattern" but no color parameter so an empty array is created. Solution: enlarge the returned array.