[
https://issues.apache.org/jira/browse/PDFBOX-4260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16536730#comment-16536730
]
Jesse Long commented on PDFBOX-4260:
------------------------------------
Thank you for looking at the patch. I have attached a new patch against the 2.0
branch.
The test method you added was passing on 2.0 without me modifying the patch.
PDPageContentStream doing Closeable.close() properly, so not triggering this
bug.
Actually, because encoding happens in close(), not respecting
Closeable.close()'s requirement for ignoring second close() call can result in
double encoding of data. I added a test to both closing twice and that the
encoding remains correct after double close.
> Reduce RAM requirement of COSOutputStream
> -----------------------------------------
>
> Key: PDFBOX-4260
> URL: https://issues.apache.org/jira/browse/PDFBOX-4260
> Project: PDFBox
> Issue Type: Improvement
> Components: Writing
> Affects Versions: 2.0.11
> Reporter: Jesse Long
> Priority: Minor
> Fix For: 2.0.12, 3.0.0 PDFBox
>
> Attachments: pdfbox-4260-2.patch, pdfbox-cosstream.patch
>
>
> COSOutputStream uses a byte array to buffer data prior to filtering. This is
> bad. As commented in COSOutputStream, it should be updated to use a scratch
> file buffer instead.
> This patch does that.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]