if (contentType.indexOf("html") == -1) {
FopFactory fopFactory = FopFactory.newInstance();
fopFactory.setUserConfig(workFlowBean.getRequest().getRealPath("/WEB-INF/fop-config/userconfig.xml"));
FontInfo fontInfo = new FontInfo();
Map map = fontInfo.getFonts();
FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
Fop fop = fopFactory.newFop(mimeConstants, foUserAgent, out);
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new StreamSource(xslt));
transformer.setParameter("versionParam", "2.0");
Source src = new StreamSource(xml);