Hi,
I'm new batik.I need to draw some HTML content to SVG. 
So, that i used SVGGraphics2D to draw via JLabel.

SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
label.print(svgGenerator.create());

I need to re size the SVG by specifying view box attribute. i tried below
code but no use

Element root = svgGenerator.getRoot();
root.setAttributeNS(null, "viewBox", "0 0 800 600");
PrintWriter savefile = new PrintWriter(new FileWriter(svgFile));
svgGenerator.stream(savefile, true);

In my output SVG file,viewBox attribute not appeared

I searched the forum's but im not able to find the solution. 
Anyone please help to solve this issue.

Thanks in advance.

Regards,
Aashik
-- 
View this message in context: 
http://www.nabble.com/How-to-set-viewbox-attribute-in-SVGGraphics2D-tp24600865p24600865.html
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to