You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/02/26 07:57:00 UTC
[jira] [Commented] (PDFBOX-5111) Premature EOF in
RandomAccessReadBuffer using an InputStream
[ https://issues.apache.org/jira/browse/PDFBOX-5111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17291454#comment-17291454 ]
ASF subversion and git services commented on PDFBOX-5111:
---------------------------------------------------------
Commit 1886946 from lehmi@apache.org in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1886946 ]
PDFBOX-5111: InputStream.available isn't reliable use read() instead to determine if more data is available
> 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
> Priority: Major
> 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