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 100 forks source link

ssr support #105

Closed Timibadass closed 5 years ago

Timibadass commented 5 years ago

Hi, is it SSR compatible? Because I'm getting "Cannot set property 'render' of undefined" when using it in Nuxt

HackbrettXXX commented 5 years ago

Could you elaborate a bit? svg2pdf requires a proper DOM implementation in order to work. Also make sure you are loading the scripts correctly and you are using the yWorks fork of jsPDF.

Could you send us the complete stacktrace?

Timibadass commented 5 years ago
  1. I am loading the scripts using the script tag
  2. here's the stack trace commons.app.js:7190 Uncaught (in promise) TypeError: Cannot set property 'render' of undefined at normalizeComponent (commons.app.js:7190) at Module../pages/admin/certificate-issue.vue (pages_admin_certificate-issue.js:1527) at __webpack_require__ (runtime.js:787) at fn (runtime.js:150)
HackbrettXXX commented 5 years ago

This looks pretty much like an error that is not related to svg2pdf. The error is not even thrown within svg2pdf.

If you are still sure this is an issue with svg2pdf contact us again.