I’m creating piecharts using JFreeChart, use chart.createBufferedImage(width,height) and give the buffered image to IReport as an image parameter. In IReport I have an image and its image expression points to this parameter, so I can render the image. But when exported to PDF, images are covered with a black rectangle. Something about transparency or RGB, I guess.
There’s a thread here about this problem and some suggested solutions, but I couldn’t apply them to my problem, will you help me? Thanks.
The thread: http://www2.jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=21922&page=2#24710
As suggested by @Pekka, this is likely a limitation of Transparency in PDF files.
The
JFreeChartclass includes acreateBufferedImage()method that accepts animageType, which is subsequently used to create theBufferedImage. You may have to select the optimal one empirically.