Arthur Wang has shared OneDrive files with you. To view them, click the links 


Ashley NJ_HHL101125_FV.pdf<!AhA_REgBppCpgQluAoJe28B935ru>




Screen Shot 2018-04-16 at 9.23.52 

just tried on 2.0.9, it works almost the same. to process all 4 pages cost 32 
seconds, if only process the first page, it cost about 4 seconds.

My server is HP DL380 with dual Xeon processors and 32 G RAM, the hard drive is 
Intel Optane SSD NVMe.

Once the JPG image is produced, the access of the image is almost instant 
regardless the size of the image file, so the open and close time of the image 
file are insignificant and could be ignored.

By enable subsampling, do you mean to set up the dpi option ? do you have the 
sample code for PDFRenderer ? attached file is my testing 
code. Ashley...pdf is a file with size about 45 M, and Gill...pdf is a file 
with size about 5 M. with the size 1/10th of the other one, the processing time 
is cut down to 2657 milliseconds compare to 3779 milliseconds. seems like the 
size does matter.



From: Tilman Hausherr <>
Sent: Monday, April 16, 2018 8:57 AM
Subject: Re: Performance issue with PDFBox 2.0.8

- retry with the current version 2.0.9
- share your file for a profiler analysis
- as said by Itai (who implemented it) try enabling subsampling in
PDFRenderer (read the javadoc first). Compare the results and decide
whether the quality is OK for you.
- set the energy settings of your computer to maximum or at least to
"balanced", not to "energy save"
- don't know if adding GPU will help;
- try also the
-Dorg.apache.pdfbox.rendering.UsePureJavaCMYKConversion=true option

The speed is not related to the size but to the complexity. 32 seconds
may sound disappointing but it's not the worst I've ever seen. "Nice
illustrations" with nested patterns or large shadings may be slow.


Am 16.04.2018 um 09:21 schrieb Arthur Wang:
> Hi, everyone,
> I am using PDFBox 2.0.8 and java 8 running in tomcat 8 for production to 
> convert pdf into image for display. it works very well for pdf file size less 
> than 5 M, it takes about 3800 milliseconds. however, it slows down very much 
> when the file size is increased to 50 M. it takes about 70,000 milliseconds, 
> after setting system property of sun.java2d.cmm", 
> "sun.java2d.cmm.kcms.KcmsServiceProvider", it does increase the performance 
> to 32550 milliseconds, which almost double the speed. but for 32 seconds to 
> load a web page still too slow. Is there any other way to speed up the 
> performance? would adding a GPU into the server help the performance? or any 
> other software or hardware solution could help on the processing speed? My 
> current server come with 32 G RAM, and the server never used more than half 
> of it.
> thanks,
> Arthur

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to