SVGGraphics2D - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!



jaranjaran Posts: 32Member

I am using SVGGraphics2D from Batik ( I have problems setting the size of my SVG. I am trying to retreive the root element and use setAttribute on this but it does not work. The parameters are not there when the SVG is saved.

I am programming Java Servlets and sending the SVG back on requests. Rendering and everything else is going smooth. It's just the size that won't be set.

Has anyone heard of this problem before?

Here is the current code:
DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
Document document = domImpl.createDocument(null, "svg", null);

m_svg2D = new SVGGraphics2D(document);

Element root = m_svg2D.getRoot();


Thanks in advance.

Sign In or Register to comment.