I get a OutOfMemoryException (Java heap space) while transforming a
relatively large XML (10 MB) with a XSL-FO to a PDF file. I'm using these
steps for the transformation:

---
FOUserAgent userAgent = fopFactory.newFOUserAgent();
Fop fop = this.fopFactory.newFop(MimeConstants.MIME_PDF, userAgent, out);
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new StreamSource(xslFile));
transformer.setParameter("versionParam", "2.0");
Source src = new StreamSource(xmlFile);
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(src, res);
---

I have tried to increase the initial and maximum heap size (with options
-Xms and -Xmx) at JVM startup but with no success. While transforming, I'm
monitoring the size of the used and maximum tenured generation memory pool.
The options don't seem to affect the tenured pool size: this pool is
continuously getting full in 3, 4 minutes which results shortly after that
in this exception.

What are my options to prevent the OutOfMemoryException?

Best regards,
Dennis van Zoerlandt
-- 
View this message in context: 
http://old.nabble.com/OutOfMemoryException-while-transforming-large-XML-to-PDF-tp31236044p31236044.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to