Andreas Lehmkühler created PDFBOX-5483:
------------------------------------------
Summary: Replace methods using an InputStream from Loader.loadPDF
Key: PDFBOX-5483
URL: https://issues.apache.org/jira/browse/PDFBOX-5483
Project: PDFBox
Issue Type: Improvement
Components: Parsing
Affects Versions: 3.0.0 PDFBox
Reporter: Andreas Lehmkühler
Assignee: Andreas Lehmkühler
Fix For: 3.0.0 PDFBox
As discussed on dev@pdfbox
{quote}
We have to remove the loadPDF variants using InputStream and replace them with
RandomAccessRead.
If it comes to InputStreams users have to decide how to procide:
* copy the InputStream to memory by using RandomAccessReadBuffer
* copy the InputStream to a file and use RandomAccessReadBufferedFile or
RandomAccessReadMemoryMappedFile
This would make it more transparent what happens under the hood when using the
different kinds of loadPDF methods:
* a byte array as source is already in memory and the obvious choice is to use
RandomAccessReadBuffer as a wrapper
* a file as source targets a local file and the most obvious choice is to use
RandomAccessReadBufferedFile as a wrapper. We should document that as the other
alternative RandomAccessReadMemoryMappedFile is offered in this case
* RandomAccessRead as source is the most obvious one and the user decides how
to create it. Additionally is ist possible to implement some own caching
loading and/or mechanism
{quote}
see PDFBOX-5462 and [High memory usage with pdfbox
3|https://lists.apache.org/thread/6mmgp23v8b2yztj4hghkgkd14s1gzs8g] as well
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]