You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

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:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!