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

IllegalArgumentException: Dimensions (width=458477041 height=26) are too large

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.29, 3.0.0 PDFBox
    • 2.0.30, 3.0.1 PDFBox, 4.0.0
    • Rendering
    • None

    Description

      java.lang.IllegalArgumentException: Dimensions (width=458477041 height=26) are too large
          org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.from1Bit(SampledImageReader.java:404)
          org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.getRGBImage(SampledImageReader.java:202)
          org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:476)
          org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:439)
          org.apache.pdfbox.rendering.PageDrawer.drawImage(PageDrawer.java:1113)
          org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:74)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:892)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:530)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:505)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:152)
          org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:292)
          org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:343)
          org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:531)
          org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:510)
          java.base/java.lang.Thread.run(Thread.java:1623)
      

      This happens on jdk20, not on jdk8 and jdk11, these throw a NegativeArraySizeException which is already caught because of the same file.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: