Am 15.03.23 um 08:37 schrieb Tilman Hausherr:
On 14.03.2023 16:05, Gilad Denneboom wrote:
However, I'm getting an IOException ("Too many open files") from
ScratchFile after several thousands files were processed. I had a look at
the source code for that class and I think it might have to do with a
RandomAccessFile variable ("raf") not being properly closed.

Can you build from source and run your application? If yes, change

pdfbox\src\main\java\org\apache\pdfbox\io\ScratchFileBuffer.java

and add

IOUtils.closeQuietly(pageHandler);

near the end. Does this make things better? (It changes nothing in build)
I won't do that. Depending on the specific situation the ScratchFile instance may hold more than one buffer and calling close will close all of them most likely too early.

Andreas


Tilman



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to