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

Axises in svg-diagram do not render correctly on PDF #89

Closed Fadiabb closed 5 years ago

Fadiabb commented 5 years ago

Exporting svg-diagram to pdf does not draw the x-axis, y-axis correctly using the following example: https://gist.github.com/Fadiabb/093859a7fdc1e2565ca60db2455885c5 will generate pdf with clearly thicker axis.

Tested with:

Fadiabb commented 5 years ago
<path class="domain" stroke="black" d="M-6,242.5H0.5V0.5H-6"></path>

does not render properly on PDF

yGuy commented 5 years ago

Thank you for your reports - please create a complete test-case. It's simple: provide a self-contained, minimal svg and describe exactly what you were expecting. In this case the problem could be due to the "domain" class not being treated correctly, however we cannot know.

yGuy commented 5 years ago

I think I was wrong, I think the problem is due to the fill="none" not being inherited and it hasn't got anything to do with the classes. Looks like this is the same issue as in https://github.com/yWorks/svg2pdf.js/issues/87#issuecomment-499100787