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
655 stars 101 forks source link

Line element: not specified coordinate #34

Closed hrbaer closed 6 years ago

hrbaer commented 6 years ago

SVG documentation says: If the attribute is not specified, the effect is as if a value of "0" were specified. Origin in line below is (0|0), but (NaN|NaN) in PDF.

<line x2="300" y2="150" stroke-width="3" stroke="black"/>

yGuy commented 6 years ago

Looks like this line is missing some || 0 treatment: https://github.com/yWorks/svg2pdf.js/blob/master/src/svg2pdf.js#L1064 @HackbrettXXX ?

HackbrettXXX commented 6 years ago

That's true. I'm gonna fix it as soon as possible.

hrbaer commented 6 years ago

Great. The problem turned up when using D3’s scale functions. Regards HB

Am 14.11.2017 um 12:16 schrieb Lukas Holländer notifications@github.com<mailto:notifications@github.com>:

That's true. I'm gonna fix it as soon as possible.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/yWorks/svg2pdf.js/issues/34#issuecomment-344227221, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHG8_FRjEb0jwzTvBokg-6W_a4bIweIyks5s2XaYgaJpZM4QaFnw.

yGuy commented 6 years ago

Fixed in 1.1.2