svgmate is a java web application which uses the batik svg toolkit to generate images from svg files.
Currently only the PNG format is supported. But since batik supports more svgmate may also support other formats in the future.
The web application can be tested here. On this page you can upload a SVG file and will receive a PNG file. Behind the scenes is a servlet to which an SVG file can be posted.
Beside the POST method it supports the GET method.
With GET the content of a SVG file can be defined using request parameters. The parameter value is embedded in an <svg> element and then converted.
E.g. the url
http://tomcat.banapple.de/svgmate/svgmate?content=%3Crect%20x=%220%22%20y=%220%22%20width=%2299%22%20height=%2299%22%20fill=%22red%22%20stroke=%22black%22/%3E%3Ctext%20x=%2220%22%20y=%2280%22%20transform=%22rotate(-60,20,80)%22%3EThis%20is%20the%20text%3C/text%3E&width=100&height=100
produces the image
%22%3EThis%20is%20the%20text%3C/text%3E&width=100&height=100)
The source code is available via anonymous svn:
The web application can then be build with maven:
You may try the application with the file http://subversion.banapple.de/public/svgmate/src/test/resources/rotated_text.svg:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-
"http:>
<svg xmlns="http: width="300" height="200"
xmlns:xlink="http:>
<title>rotated text</title>
<desc>an example of a rotated text</desc>
<text x="20" y="180"
font-family="verdana" font-size="16px"
transform="rotate(-60,20,180)">
This is the rotated text
</text>
</svg>
An application of the servlet is the vbox user macro, a confluence user macro which generates vertical text.
Please leave a comment for bugs or suggestions.