svg2pdf.js icon indicating copy to clipboard operation
svg2pdf.js copied to clipboard

Support of `href` in `a` element

Open linev opened this issue 1 year ago • 1 comments

Seems to be, href attribute is not supported in a element.

Simple example from developer.mozilla.org.

<svg viewBox="0 0 160 40" xmlns="http://www.w3.org/2000/svg">
  <a href="https://developer.mozilla.org/">
    <text x="10" y="25">MDN Web Docs</text>
  </a>
</svg>

As I can see, a element handled exactly in the same way as g element and href attribute just ignored.

But jsPDF has link method which can be applied here.

Are there plans to support it?

Should I try to create PR solving this problem?

linev avatar Sep 30 '24 12:09 linev

If it's that simple, I don't see why we should not be doing this. Maybe we would like to have this configurable (enabled/disabled), but supporting this sounds like a good idea. We would definitely consider a PR! Thanks!

yGuy avatar Sep 30 '24 16:09 yGuy