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

Facing error while generating the PDF.

edited Feb 26, 2024 6:05AM in Visual Builder 9 comments

Summary:

  1. I imported the jsPDF.min.js library.
  1. Using the simple JavaScript function to generate the PDF.

define(['resources/js/jspdf.min'],function(jsPDF){

  'use strict';

class PageModule {

generatePDF(arg1) {

      const doc = new jsPDF();

     // let doc= new jsPDF('p', 'pt',[1200,1000]);

      doc.text(10,10,'Hello World');

      doc.save('hello.pdf');

    }

  }

 return PageModule;

});

Facing below mentioned error:-


can anyone check and let me know what wrong am i doing?

Please help me to complete this task.

Thanks in advance

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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