#28868

Hmm… if you can split the huge document to smaller portions, probably even a PD4ML.render( URL[], … ) or PD4ML.render( StringReader[], … ) method should help. It will render each of multiple HTMLs one-by-one, deallocating parsed structures after a portion is converted to PDF.

The following code should reduce RAM utilization if your document has bulky images.
[language=java:1mepq6g0]Map m = new HashMap();
m.put(PD4Constants.PD4ML_CACHE_IMAGES_IN_TMP_DIR, “true”);
pd4ml.setDynamicParams(m);[/language:1mepq6g0]