Howdy, Stranger!

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


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.


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.