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

Premature EOF in RandomAccessReadBuffer using an InputStream

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0 PDFBox
    • Fix Version/s: 3.0.0 PDFBox
    • Component/s: Parsing
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: