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 .
I can't find a way to set RGB or trasparency values from JFreeChart.
The JFreeChart
class includes a createBufferedImage()
method that accepts an imageType
, which is subsequently used to create the BufferedImage
. You may have to select the optimal one empirically.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.