Hi Asif,
asif_zzz <[email protected]> wrote on 07/22/2009 02:43:39
AM:
> SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
> label.print(svgGenerator.create());
You can just pass the svgGenerator you don't need to call create.
> Element root = svgGenerator.getRoot();
Calling getRoot clears the contents of the svgGenerator.
So after this call the generator should have no content in it.
> root.setAttributeNS(null, "viewBox", "0 0 800 600");
> PrintWriter savefile = new PrintWriter(new FileWriter(svgFile));
This is fine.
> svgGenerator.stream(savefile, true);
>
> In my output SVG file,viewBox attribute not appeared
You should get a more or less empty SVG file here.
I think you should replace this with:
svgGenerator.stream(root, savefile, true, false);
> I searched the forum's but im not able to find the solution.
> Anyone please help to solve this issue.
I hope this helps.