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

FlateFilter decode() throwing OutOfMemoryError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.8.0-incubator
    • Text extraction
    • None
    • OSX, Windows, Centos 5.2

    Description

      When parsing certain PDF files an OutOfMemoryError occurs at FlateFilter line 100. The files in question are not big.

      An exception occured in parsing the PDF Document.
      java.lang.OutOfMemoryError
      at java.util.zip.Inflater.inflateBytes(Native Method)
      at java.util.zip.Inflater.inflate(Inflater.java:221)
      at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:135)
      at org.apache.pdfbox.filter.FlateFilter.decode(FlateFilter.java:100)
      at org.apache.pdfbox.cos.COSStream.doDecode(COSStream.java:279)
      at org.apache.pdfbox.cos.COSStream.doDecode(COSStream.java:221)
      at org.apache.pdfbox.cos.COSStream.getUnfilteredStream(COSStream.java:156)
      at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:367)
      at org.apache.pdfbox.util.PDFStreamEngine.processEncodedText(PDFStreamEngine.java:325)
      at org.apache.pdfbox.util.operator.ShowText.process(ShowText.java:50)
      at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:493)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:214)
      at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:173)
      at org.apache.pdfbox.util.PDFTextStripper.processPage(PDFTextStripper.java:335)
      at org.apache.pdfbox.util.PDFTextStripper.processPages(PDFTextStripper.java:259)
      at org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:215)
      at org.apache.pdfbox.util.PDFTextStripper.getText(PDFTextStripper.java:148)

      Attachments

        1. s4uk12ter_1.pdf
          123 kB
          Paul Sowden
        2. s417sec_1.pdf
          368 kB
          Paul Sowden

        Activity

          People

            Unassigned Unassigned
            psowden Paul Sowden
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: