yWorks / svg2pdf.js

A javascript-only SVG to PDF conversion utility that runs in the browser. Brought to you by yWorks - the diagramming experts
MIT License
649 stars 98 forks source link

Text on Paths #152

Open c-murray opened 3 years ago

c-murray commented 3 years ago

Describe the bug In the SVG I'm expecting text to follow the assigned path, in the playground the browser preview works properly. In the downloaded pdf the text is not located on the path and is instead at the top of the document.

To Reproduce See this playground.

Expected behavior I would have expected the PDF to look like it does in the browser, with the text centered along the path. Desktop (please complete the following information):

Additional context Add any other context about the problem here.

HackbrettXXX commented 3 years ago

Yes, text paths are not supported. See also #82. We would be very happy about a pull request, though ;)

HackbrettXXX commented 3 years ago

Specification reference: https://www.w3.org/TR/SVG2/text.html#TextLayoutPath

For an implementation we might "steal" some code from Canvg.

listopadiya commented 3 years ago

Seems to be challenging but interesting task, I can take it if you don't mind.

HackbrettXXX commented 3 years ago

Sure, go ahead ;)