Hi! When I create an image through command line (CLI) the png looks perfect. But when I embed FOP into Java it's a bit hazy.
Here the outputfile of CLI: http://www.nabble.com/file/p11285163/data_krank.png Here the outputfile of Java embedded: http://www.nabble.com/file/p11285163/portal.png I started FOP from command line as following: fop.bat -c userconfig.xml -xml data\data.xml -xsl FOP_Stylesheet.xsl -png data.png The Java snippets looks like that: ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); Fop fop = null; fop = fopFactory.newFop(MimeConstants.MIME_PNG, foUserAgent, outputStream); // Setup XSLT TransformerFactory factory = TransformerFactory.newInstance(); SAXSource xsltSource = new SAXSource(new InputSource(Thread.currentThread().getContextClassLoader().getResourceAsStream("com/xt/icee/rendering/resource/FOP_Stylesheet.xsl"))); Transformer transformer = factory.newTransformer(xsltSource); // Set the value of a <param> in the stylesheet transformer.setParameter("versionParam", "2.0"); if (width != -1) { transformer.setParameter("display.width", String.valueOf(width)); } if (height != -1) { transformer.setParameter("display.height", String.valueOf(height)); } // Resulting SAX events (the generated FO) must be piped through to FOP Result res = new SAXResult(fop.getDefaultHandler()); // Start XSLT transformation and FOP processing transformer.transform(xmlSource, res); Does anyone have a clue why the two results are different? Thanks in advance! Franz -- View this message in context: http://www.nabble.com/PNG-Outputfile-different-from-CLI-and-embedded-FOP-tf3975648.html#a11285163 Sent from the FOP - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
