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

NegativeArraySizeException thrown when converting PDF to Image (in TilingPaint.java)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.5, 3.0.0 PDFBox
    • Component/s: None
    • Labels:
      None

      Description

      Specifically page 7 of the PDF document is failing.
      PDF Document:
      http://download.win2pdf.com/samples/PowerPoint-slides.pdf
      (also attached to ticket)

      Stack trace:
      Exception in thread "main" java.lang.NegativeArraySizeException
      at java.awt.image.DataBufferByte.<init>(DataBufferByte.java:76)
      at java.awt.image.Raster.createInterleavedRaster(Raster.java:266)
      at java.awt.image.Raster.createInterleavedRaster(Raster.java:212)
      at java.awt.image.ComponentColorModel.createCompatibleWritableRaster(ComponentColorModel.java:2825)
      at org.apache.pdfbox.rendering.TilingPaint.getImage(TilingPaint.java:134)
      at org.apache.pdfbox.rendering.TilingPaint.<init>(TilingPaint.java:69)
      at org.apache.pdfbox.rendering.PageDrawer.getPaint(PageDrawer.java:251)
      at org.apache.pdfbox.rendering.PageDrawer.getNonStrokingPaint(PageDrawer.java:526)
      at org.apache.pdfbox.rendering.PageDrawer.fillPath(PageDrawer.java:597)
      at org.apache.pdfbox.contentstream.operator.graphics.FillEvenOddRule.process(FillEvenOddRule.java:36)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:829)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:486)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:460)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
      at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:189)
      at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:145)
      at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:94)
      at org.apache.pdfbox.tools.PDFToImage.main(PDFToImage.java:236)
      at org.apache.pdfbox.tools.PDFBox.main(PDFBox.java:94)

        Attachments

        1. PDFBOX-3653_reduced.pdf
          6 kB
          Tilman Hausherr
        2. PowerPoint-slides.pdf
          1.64 MB
          Emily Coyne

          Issue Links

            Activity

              People

              • Assignee:
                tilman Tilman Hausherr
                Reporter:
                emc Emily Coyne
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: