Hallo Tobias,
Just a random guess, since we had a problem with blank images in FOP 1.1
recently, too. In our case, the "culprit" was Mac OS X, producing PNG
images with header data that FOP 1.1 disliked. After pumping those
images through ImageMagick convert, FOP found the PNGs much better, and
displayed them properly.
Cheers,
Stefan
Am 24.03.2014 13:07, schrieb Tobias Luikard:
Hello,
I'm trying to upgrade an existing application from fop 0.20.5 to 1.1.
We used to produce BufferedImages by the AWT Renderer. Now I try to make
it right. After lots of searching and trying now I have the following code:
======================
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new
StreamSource(
xslt));
setParameter(transformer, parameters, mitarbeiter);
Source src = new StreamSource(new StringReader(xml));
FOUserAgent userAgent = fopFactory.newFOUserAgent();
PageableRenderer renderer = new PageableRenderer(userAgent);
renderer.setScaleFactor(1);
userAgent.setTargetResolution(72);
userAgent.setRendererOverride(renderer);
Fop fop = fopFactory.newFop(userAgent);
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(src, res);
List images = new ArrayList();
for (int i = 0; i < renderer.getNumberOfPages(); i++) {
BufferedImage pageImage = renderer.getPageImage(i);
images.add(pageImage);
}
======================
The problem is, that FOP only produces blank images. I tried, I searched
and I debugged. But I have no glue what's going wrong...
Has anyone any hints?
Thanks
Tobi
P.S. I got the problem solved with 1.0 but this didn't work with
Webstart. :-(
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
--
Oracle <http://www.oracle.com>
Stefan Hinz | MySQL Documentation Manager | +49-30-82702940
Oracle MySQL <http://dev.mysql.com/doc>
Berlin, Germany
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org