Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4279

ArrayIndexOutOfBoundsException in PDDeviceGray.toRGB

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.11
    • 2.0.12, 3.0.0 PDFBox
    • Rendering
    • 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.

      Attachments

        1. pop-bugzilla62905.pdf
          1 kB
          Tilman Hausherr

        Activity

          People

            tilman Tilman Hausherr
            tilman Tilman Hausherr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: