}
svgRoot.setAttributeNS(null, "width", "" + (totalWidth + 1));
svgRoot.setAttributeNS(null, "height", "" + (totalHeight + 1));
//svgRoot.setAttributeNS(null, "viewBox", "0 0 " + pageWidth + " " + pageHeight);
SVGTranscoder svgT = new SVGTranscoder();
TranscoderInput input = new TranscoderInput(svgDocument);
TranscoderOutput output =
new TranscoderOutput(new OutputStreamWriter(ostream));
try {
svgT.transcode(input, output);
} catch (TranscoderException e) {
log.error("could not write svg file :" + e.getMessage(), e);
}
ostream.flush();
ostream = null;