Reputation: 162
I am having trouble with PDFBox. I am using it to convert a PDF with a bunch of postage stamps to a BufferedImage which then gets cut into pieces (each individual stamp) and saved. This works fine on my main computer. However if I run it on an old crappy laptop (i5-4210U with 8gb ram) (Which I use as my server because of the low power usage and price) It will sometimes stop without any message or exception on the following line
BufferedImage bim = pdfRenderer.renderImageWithDPI(pageIndex, 400);
Most of the time it works on the second try, and it only happens on the first page. Once the first page worked it will render all following pages (tried up to about 40) without any issue.
I am using PDFBox 2.0.24 (tried 2.0.8 as well). What could be the reason for that behaviour?
I can not share the any of the PDFs because it contains personal data but since it works on my main PC I think it does not have anything to do with the files.
Upvotes: 0
Views: 860
Reputation: 162
Just stumbled over this question again after forgetting about it. Updating the java jdk on the server to the newest version actually resolved the problem and it has not happened since then.
Upvotes: 2