Using SVG image

0

I have a report where I should use a very specific map-based chart so I thought about using SVG files. I've read you can use SVG files with jasper reports using Batik Renderer but I would like to know whether it is possible to modify SVG elements from that chart according to data. That is, my SVG is not a static image file but a chart that should be dependant on data.

An alternative would be using java to generate the svg bytes then passing these to Jasper, is it possible to programmatically add a SVG image to a report?

gabriel.sanmartindiaz's picture
Joined: Jun 12 2013 - 4:07am
Last seen: 4 years 4 months ago

2 Answers:

1

If you generate a SVG document in your code, you can pass it to the report as a parameter (either byte array or String), and create a BatikRenderer instance using the parameter value.  See the Javadoc for details on the BatikRenderer methods.

HTH,

Lucian

lucianc's picture
7209
Joined: Jul 17 2006 - 1:10am
Last seen: 3 days 20 hours ago

I created an SVG file with batik. It can be opend with the browser - looks fine.
But how do I get the "needed" byte array...? Do I have to generate a file first or when is the "turn-over-point" ?^^

Timbo2013 - 6 years 6 months ago
0

*delete*

Timbo2013's picture
Joined: Aug 5 2013 - 5:32am
Last seen: 6 years 4 months ago
Feedback
randomness