You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2020/09/19 17:53:00 UTC

[jira] [Comment Edited] (PDFBOX-4836) Reduce the usage of ScatchFileBuffer when parsing a pdf

    [ https://issues.apache.org/jira/browse/PDFBOX-4836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17198807#comment-17198807 ] 

Tilman Hausherr edited comment on PDFBOX-4836 at 9/19/20, 5:52 PM:
-------------------------------------------------------------------

RandomAccessReadBuffer(InputStream) creates an empty buffer if the InputStream is from an URL.openStream() because available() returns 0. I have this on jdk8.

I noticed this in the recently committed code at the end of the TestPublicKeyEncryption class, it doesn't work when loadPDF(url.openStream()) is called.


was (Author: tilman):
RandomAccessReadBuffer(InputStream) creates an empty buffer if the InputStream is from an URL.openStream() because available() returns 0. I have this on jdk8.

> Reduce the usage of ScatchFileBuffer when parsing a pdf
> -------------------------------------------------------
>
>                 Key: PDFBOX-4836
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4836
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Parsing
>    Affects Versions: 3.0.0 PDFBox
>            Reporter: Andreas Lehmkühler
>            Assignee: Andreas Lehmkühler
>            Priority: Major
>             Fix For: 3.0.0 PDFBox
>
>         Attachments: EDGE11896203.pdf, image-2020-05-17-16-40-28-712.png, raw_image_demo.pdf
>
>
> Instead of using a scatchfile buffer to read a COSStream the parser should use the source directly to reduce the memory footprint



--
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