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

Wrong stream length

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.6, 1.8.7, 1.8.8, 2.0.0
    • 1.8.8, 2.0.0
    • Parsing
    • None

    Description

      The file of PDFBOX-2048 has a wrong encoded font length, it is 4412 in the PDF but it is really about 27350. This wrong length is used to read the encoded font stream and this results in further trouble (EOF).

      The problem is that the wrong length is passed to createFilteredStream() instead of just calling it without parameters. In cosStream.doDecode() unFilteredStream = filteredStream (there is a FIXME there!!!), and in doDecode(COSName filterName, int filterIndex) unFilteredStream.getLength() is used, which returns the expectedLength.

      Attachments

        1. 063344.pdf
          106 kB
          Tilman Hausherr
        2. 156339.pdf
          148 kB
          Tilman Hausherr
        3. 359669.pdf
          442 kB
          Tilman Hausherr
        4. 416089.pdf
          61 kB
          Tilman Hausherr
        5. 490554.pdf
          114 kB
          Tilman Hausherr

        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: