Hi,
I am using FOP for the PDF generation in our project and For creating the
xml source I am using the DOMSource model.Now at the
time of transforming the XML document into PDF CPU usage rises to 99% and not
getting down. Every time I am generating PDF I am
facing same problem and this causes low performance at Server side. Please help
me out resolving this issue. How I can reduce the CPU
usage?
Following code is used for the FOP:
OutputStream out = new FileOutputStream(tempFile);
out = new BufferedOutputStream(out);
FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out);
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
Source source = new DOMSource(document);
Result result = new SAXResult(fop.getDefaultHandler());
transformer.transform(source, result);
I am new to FOP so please help me resolving this issue...
Thanks,
Yatin Soni