Forum How do I...?

xlink:href="#reference” inside SVGs?

chrisw
Would the below type of link work from inside SVGs to link to other parts of the document. (I can't get it to work, but I'm not sure if I am doing something wrong.)

xlink:href="#reference”

I can get xlink:href="http://google.com” to work, but not the above in order to, for example, make it possible to click an element of an image and land in a designated place in the PDF.

All the best,

Christian
mikeday
This does not work yet, sorry.
mikeday
This has now been fixed in Prince latest builds. :D
chrisw
:D Great news!
chrisw

I just downloaded and tried with the latest PrinceXML 10 build for Mac OS X, but I still can't make it work.

Instead of the link, I get what looks like encoded "something" starting with "+xml;base64"

(This is what I saw back in 2015 too.)

By the way, what I'm currently really looking for is to get title or xlink:title to work, so that SVG graphics can have elements annotated "tooltip"-like text that appears when hovering over them.

mikeday
You need to use the latest builds, not Prince 10.

The latest builds also support a new "prince-tooltip" property which can take generated content to make a PDF tooltip, although now that I think about it perhaps this does not yet support SVG.
chrisw
Sorry for the confusion. I'm using prince-20161013-macosx . That's the latest, right? (I thought everything is called Prince 10 now.)

It is this version that I'm currently trying but with the problem that I described.

prince-tooltip works in HTML, but I don't know how to test it for SVGs. (For SVGs so far I have tried xlink:href= and xlink:title .)
mikeday
Would you be able to email me (mikeday@yeslogic.com) the document?
jeric
Is it currently possible to use tooltips on svg elements? The comments in this thread seems to suggest that it was incorporated in pre-release builds .. however on the roadmap the item refering to this thread is not marked as done.

A little backgound: I'm currently researching if it is possible to use the prince-tooltip functionality for displaying tooltips in generated SVG charts. The charts contain <title> tags which browsers automatically display as tooltip, it would be really nice if prince supports this as well.