pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PDFBOX-4279) ArrayIndexOutOfBoundsException in PDDeviceGray.toRGB
Date Thu, 26 Jul 2018 16:18:00 GMT
Tilman Hausherr created PDFBOX-4279:
---------------------------------------

             Summary: ArrayIndexOutOfBoundsException in PDDeviceGray.toRGB
                 Key: PDFBOX-4279
                 URL: https://issues.apache.org/jira/browse/PDFBOX-4279
             Project: PDFBox
          Issue Type: Bug
          Components: Rendering
    Affects Versions: 2.0.11
            Reporter: Tilman Hausherr
            Assignee: Tilman Hausherr
             Fix For: 2.0.12, 3.0.0 PDFBox
         Attachments: pop-bugzilla62905.pdf

{code}
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)
{code}
The cause is 
{code}
  /CS2 CS
  /P2 SCN
{code}
The first line sets a pattern with DeviceGray, the second line sets an "uncolored tiling pattern"
but no color so an empty array is created. Solution: enlarge the returned array.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Mime
View raw message