PDF external javascript import library failing
Summary:
Hi Experts
I'm trying to import jspdf.min.js external library into VBCS app but after adding the library and using it in javascript function my application is not loading in live/design and in preview mode as well. Please help, I'm attaching the source code / .zip file of application here
I have imported the javascript file in resources section and have used below JavaScript function
define(['resources/javascript/jspdf.min'], (jspdf) => {
'use strict';
class PageModule {
generatepdf() {
var doc = new jspdf();
doc.text(10, 10, 'Hello world!');
console.log(doc.output('datauristring'));
doc.save('hello.pdf');
}
}
return PageModule;
});
Please help
Tagged:
0