Hi,
 
I created a code snippet to convert XML+XSL FO to PDF using FOP.
I am using OC4j as Application Server.
 
Here is the code:
 
      FopFactory fopFactory = FopFactory.newInstance();
      FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
      OutputStream out = new BufferedOutputStream(new FileOutputStream(new
file("/brodart.pdf")));
      Try
        {
       
System.setProperty("javax.xml.transform.TransformerFactory","org.apache.xalan.processor.TransformerFactoryImpl");
        Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent,
out);
        TransformerFactory factory = TransformerFactory.newInstance();
        Transformer transformer = factory.newTransformer(new
StreamSource(new File("/Brodart.xsl")));
        transformer.setParameter("versionParam", "2.0");
        Source src = new StreamSource(new File("/brodart.xml"));
        Result res = new SAXResult(fop.getDefaultHandler());
        transformer.transform(src, res);
            }

 

At the highlighted step seems to be taking a lot of time to execute (around
15 min).
 
Can any one please help on this issue? Here I attached the XML and XSL file
we are using.
 

Thanks
Manoj http://www.nabble.com/file/p10989960/XML_XSL.zip XML_XSL.zip 
-- 
View this message in context: 
http://www.nabble.com/Perfomance-Issue-need-Help-on-generating-PDF-from-XSL-FO-tf3878334.html#a10989960
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