We found an issue and solution to fix it, you guys might would be interested to have a look and see whether it is worth applying the attached patch to benefit more pdfbox users. And a bit more detail this error happens based on jetty running time memory setting, and pdf file size.
- Application platform:
- The test case to produce this issue:
Add simple overlay to all pages (in this case it is 750 pages). The processPages function eats up the JVM memories while applying the overlay to the file.
- sample code for using pdfbox overlay:
- Error log:
Apply MemoryUsageSetting to Overlay, allows Overlay to use file as temp output.
- Update for the Overlay usage: