You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Jason Pyeron (JIRA)" <ji...@apache.org> on 2019/05/29 19:01:00 UTC
[jira] [Comment Edited] (PDFBOX-4554) operations taking a byte[]
need to allow for offset and length too
[ https://issues.apache.org/jira/browse/PDFBOX-4554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16851214#comment-16851214 ]
Jason Pyeron edited comment on PDFBOX-4554 at 5/29/19 7:00 PM:
---------------------------------------------------------------
[~mkl] 99% correct. Actually, when a pdf file is appended with multiple signatures the byte[] is a PDF, but has 10 other historical PDFs inside of it.
[~tilman], I think you are looking too hard here - the issues is that PDF BOx is NOT USING the optimal ByteArrayInputStream(byte[] buf, int offset, int length) constructor.
See: https://docs.oracle.com/javase/7/docs/api/java/io/ByteArrayInputStream.html#ByteArrayInputStream(byte[],%20int,%20int)
was (Author: jpyeron):
[~mkl] 99% correct. Actually, when a pdf file is appended with multiple signatures the byte[] is a PDF, but has 10 other historical PDFs inside of it.
[~tilman], I think you are looking too hard here - the issues is that PDF BOx is NOT USING the [optimal ByteArrayInputStream(byte[] buf, int offset, int length) constructor|https://docs.oracle.com/javase/7/docs/api/java/io/ByteArrayInputStream.html#ByteArrayInputStream(byte[],%20int,%20int)].
> operations taking a byte[] need to allow for offset and length too
> ------------------------------------------------------------------
>
> Key: PDFBOX-4554
> URL: https://issues.apache.org/jira/browse/PDFBOX-4554
> Project: PDFBox
> Issue Type: Improvement
> Reporter: Jason Pyeron
> Priority: Major
>
> Without this, massive amounts of memory must be copied/allocated to "trim" byte[].
> See forthcoming pull request.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org