Reputation: 9646
I am using Ghost4j in a web application to convert PDF to TIFF. While doing performance testing on my application I discovered that when multiple PDF documents need to be converted it takes a long time. After further research I found this part of the documentation: http://www.ghost4j.org/threadsafetyandmultithreading.html
However, I'm confused whether I should be putting my code in synchronized
block as well as use setMaxProcessCount()
?
Here is how I'm doing it at the moment:
PDFDocument lDocument = new PDFDocument();
lDocument.load(new File (pdfFilePath));
SimpleRenderer lRenderer = new SimpleRenderer();
lRenderer.setResolution(300);
// render as images
List<Image> lImages = lRenderer.render(lDocument);
Question
Upvotes: 1
Views: 695