Magento noob here.
I have been trying to add jspdf library in magento2 and have followed following few answers in magento stackexchange. Still the constructor jsPDF() is shown as undefined.
https://magento.stackexchange.com/questions/330020/magento-2-include-js-library-without-require-js
https://magento.stackexchange.com/questions/237275/how-to-add-js-library-to-magento-2
https://magento.stackexchange.com/questions/300838/non-amd-module-jspdf-magento-2
I need to convert html content to pdf and I have tried to implement the jspdf library which are cdn links in html and it is working fine in that case.
https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.3.2/html2canvas.min.js
https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js
I have saved the above two links as separate js file so it can work on magento2 but the constructor error keeps showing.
submitted by /u/LifeofPlight
[link] [comments]