This macro converts SVG XML format to a PNG image.
Usage
{svgimage}
<svg...>
</svg>
{svgimage}
or
{svgimage:attachmentName}
{svgimage}
Additionally the following optional parameters are available:
- height - Result image's height
- width - Result image's width
Sample
Here's the source SVG documentfrom the Batik's distribution.
The result of applying:
{svgimage:sydney.svg|width=200}
{svgimage}
will be:
Download & Installation
- Download
- Drop it into WEB-INF/lib inside the Confluence web application
- Restart Confluence

Comments (8)
Apr 06, 2006
Matt Ryall (Atlassian) says:
Wow, that sounds really cool. Could you attach a few screenshots with sample mar...Wow, that sounds really cool. Could you attach a few screenshots with sample markup?
Apr 06, 2006
Dimitry Voytenko says:
Samples are attached and displayed aboveSamples are attached and displayed above
Sep 17, 2006
Damian Fawkner says:
Hi, I've installed this as per the instructions above, however when I use the m...Hi,
I've installed this as per the instructions above, however when I use the macro, I get an exception. The first couple of lines of this are:
null Enclosed Exception: SAX2 driver class org.apache.crimson.parser.XMLReaderImpl not found
org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
SAX2 driver class org.apache.crimson.parser.XMLReaderImpl not found
We're running Version 2.2.7 of Confluence, under Tomcat 5.5.
Any ideas?
Regards
Damian
Mar 02, 2007
Rick Sjogren says:
Hi Damian, What you need to do is copy the crimson.jar into your <confl...Hi Damian,
What you need to do is copy the crimson.jar into your <confluence>\WEB-INFO\lib directory. The jar is found in the zipped files that can be found at http://xml.apache.org/crimson/.
I'm using Windows, so I downloaded the zip file, extracted it into a folder, and copied the jar into the directory above. I also restarted Confluence just in case.
Note that the image is rendered with none of the cool SVG features like you would expect. At least, they didn't work for me.
Regards,
Rick
Oct 24, 2006
Ivan Benko says:
It appears that the svg image is just simply converted to png <img src='/down...It appears that the svg image is just simply converted to png
<img src='/download/temp/svgimage40309.png?contentType=image/png&delete=true'/>
Is that right?
Apr 25, 2007
Jean-Baptiste Catté says:
Nice plugin, but doesn't work with any svg fiel, this one: Bitmap_VS_SVG.svg doe...Nice plugin, but doesn't work with any svg fiel, this one: Bitmap_VS_SVG.svg doesn't work for example:
Aug 24, 2007
Joe Peichel says:
Does anyone know whether additional work is being done on this plugin? We've tri...Does anyone know whether additional work is being done on this plugin? We've tried it and discovered that it's incompatible with the FreeMind Plugin, which fails once the SVG plugin has been installed. We removed the SVG Image Macro and the Freemind Plugin resumed working.
Nov 11
Stefan Baader says:
I created a svg with inkscape. After placing in the page: null Enclosed Excepti...I created a svg with inkscape. After placing in the page:
null Enclosed Exception: null:-1 The URI "#grad36-70" specified on the element is invalid
When I open and save the svg with adobe illustrator, it works fine.
Seems to happen when a gradient is used.
any idea?