This server will be upgraded at 3pm Sydney time on December 3rd (December 2nd, 8pm PST) and will be down for up to 30 minutes.

SVG Image Macro

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

  1. Download
  2. Drop it into WEB-INF/lib inside the Confluence web application
  3. Restart Confluence

Development Resources

  1. Jira: http://developer.atlassian.com/jira/browse/SVG
  2. SVN: https://svn.atlassian.com/svn/public/contrib/confluence/svg-plugin/trunk/

Labels

repository_testing repository_testing Delete
plugin plugin Delete
macro macro Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. 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?

    1. Apr 06, 2006

      Dimitry Voytenko says:

      Samples are attached and displayed above

      Samples are attached and displayed above

  2. 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

    1. 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 

  3. 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?

  4. 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:

    null Enclosed Exception: null:-1 The URI '#lg0' specified on the element  is invalid
  5. 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.

  6. 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?