You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (Jira)" <ji...@apache.org> on 2021/02/26 07:27:00 UTC

[jira] [Created] (PDFBOX-5111) Premature EOF in RandomAccessReadBuffer using an InputStream

Andreas Lehmkühler created PDFBOX-5111:
------------------------------------------

             Summary: Premature EOF in RandomAccessReadBuffer using an InputStream
                 Key: PDFBOX-5111
                 URL: https://issues.apache.org/jira/browse/PDFBOX-5111
             Project: PDFBox
          Issue Type: Bug
          Components: Parsing
    Affects Versions: 3.0.0 PDFBox
            Reporter: Andreas Lehmkühler
            Assignee: Andreas Lehmkühler
             Fix For: 3.0.0 PDFBox


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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org