Error: Invalid argument passed to jsPDF.scale Error
tqcc opened this issue · 4 comments
core.mjs:6494 ERROR Error: Uncaught (in promise): Error: Invalid argument passed to jsPDF.scale Error: Invalid argument passed to jsPDF.scale at E.y.scale.y.__private__.scale (jspdf.es.min.js:86:5943) at E.y.__private__.setLineWidth.y.setLineWidth (jspdf.es.min.js:86:45696) at ot (svg2pdf.es.min.js:41:29338) at e.<anonymous> (svg2pdf.es.min.js:41:32521) at svg2pdf.es.min.js:41:1837 at Object.next (svg2pdf.es.min.js:41:1946) at svg2pdf.es.min.js:41:860 at new ZoneAwarePromise (zone.js:1427:1) at c (svg2pdf.es.min.js:41:621) at e.render (svg2pdf.es.min.js:41:32011) at resolvePromise (zone.js:1211:1) at resolvePromise (zone.js:1165:1) at zone.js:1278:1 at _ZoneDelegate.invokeTask (zone.js:406:1) at Object.onInvokeTask (core.mjs:25595:1) at _ZoneDelegate.invokeTask (zone.js:405:1) at Zone.runTask (zone.js:178:1) at drainMicroTaskQueue (zone.js:585:1) at ZoneTask.invokeTask [as invoke] (zone.js:491:1) at invokeTask (zone.js:1648:1)
when I test with a simple svg , it works. but when I use svg2pdf to convert a production svg file, above error occured.
Any peoole saw the same error, is it a bug?
Thanks for your report. Please strip down the broken SVG file until you can find the parts that make the export fail. With a reduced test-case you will either be able to tell what's wrong with your SVG file or we can use it to improve the library.
Please use the playground to create a proper report with a minimal test-case.
stroke-width="none"
looks suspiciously wrong - https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width