Forum How do I...?

SVG and hrefs?

JohnClarke
Does Prince support <a href=... in SVG? Can't seem to get it work.

John Clarke
Cornerstone Systems Northwest Inc.

mikeday
Prince 6.0 does, Prince 5.1 doesn't. If you can't get it to work with the latest alpha version, please send us a sample document so that we can see what's going on.
JohnClarke
Yes, I've tried with 2 alpha versions using different methods.

<svg...>
<a href="http://www.google.com">
<ellipse... />
</a>
</svg>


and

<svg...>
<ellipse... href="http://www.google.com"/>
</svg>


and

some other variations using the prince-link style attribute.

All render the SVG ok, but there is no link. Suggestions?
Note: in this case I've used an external link to make things simple however, I'm mostly interested in internal PDF links which assume would work too.

-John

John Clarke
Cornerstone Systems Northwest Inc.

mikeday
In SVG the href attribute needs to be in the XLink namespace, like this:
<svg xmlns:xlink="http://www.w3.org/1999/xlink">
<a xlink:href="...">
...
</a>
</svg>
JohnClarke
Excellent. Thank you. -John

John Clarke
Cornerstone Systems Northwest Inc.