ByteArrayOutputStream bout = new ByteArrayOutputStream();
PNGTranscoder t = new PNGTranscoder();
t.addTranscodingHint(ImageTranscoder.KEY_MEDIA, "screen");
TranscoderInput input = new TranscoderInput(new StringReader(formattedSvg));
TranscoderOutput output = new TranscoderOutput(bout);
t.transcode(input, output);
resp.setCharacterEncoding("UTF-8");
resp.setContentType("text/plain");
resp.getWriter().write("<img src=\"data:image/png;base64," + Base64.encodeBase64(bout.toByteArray()) + "\">");
} else {
storeInRepository(uuid, rawSvg, transformto, processid, repository);