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

Premature EOF in RandomAccessReadBuffer using an InputStream

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0 PDFBox
    • 3.0.0 PDFBox
    • Parsing
    • None

    Description

      There are some strange differences in the test results without changing any code, e.g. org.apache.pdfbox.pdmodel.font.PDFontTest.testPDFox5048()

      It looks like we can't rely on InputStream.available when reading a pdf from a stream (based on an URL) using RandomAccessReadBuffer. According to the javadoc ofInputStream.available the behaviour can be different for different implementations. In our case it returns 0 and PDFBox doesn't read any more data which leads to an incomplete file.

      Attachments

        Activity

          People

            lehmi Andreas Lehmkühler
            lehmi Andreas Lehmkühler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: