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

DataFormatException: invalid stored block lengths

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.8, 3.0.0 PDFBox
    • 2.0.8, 3.0.0 PDFBox
    • Parsing

    Description

      java.io.IOException: java.util.zip.DataFormatException: invalid stored block lengths
          org.apache.pdfbox.filter.FlateFilter.decode(FlateFilter.java:82)
          org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:69)
          org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:167)
          org.apache.pdfbox.pdmodel.PDPage.getContents(PDPage.java:155)
          org.apache.pdfbox.pdfparser.PDFStreamParser.<init>(PDFStreamParser.java:92)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:505)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:484)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:158)
          org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:220)
          org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:147)
          org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:69)
          org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:290)
          org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:259)
          java.lang.Thread.run(Thread.java:748)
      Caused by: java.util.zip.DataFormatException: invalid stored block lengths
          java.util.zip.Inflater.inflateBytes(Native Method)
          java.util.zip.Inflater.inflate(Inflater.java:259)
          java.util.zip.Inflater.inflate(Inflater.java:280)
          org.apache.pdfbox.filter.FlateFilter.decompress(FlateFilter.java:107)
          org.apache.pdfbox.filter.FlateFilter.decode(FlateFilter.java:73)
          org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:69)
          org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:167)
          org.apache.pdfbox.pdmodel.PDPage.getContents(PDPage.java:155)
          org.apache.pdfbox.pdfparser.PDFStreamParser.<init>(PDFStreamParser.java:92)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:505)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:484)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:158)
          org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:220)
          org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:147)
          org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:69)
          org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:290)
          org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:259)
          java.lang.Thread.run(Thread.java:748)
      

      This worked in 2.0.7. However splitting the file with 2.0.7 "solved" the problem (i.e. no problem rendering that one with the trunk), thus I assume there's some parsing problem in the trunk.

      Attachments

        1. 022616.pdf
          560 kB
          Tilman Hausherr

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: