jsPDF: html2canvas not loaded while using new .html() method

前端 未结 4 2510
刺人心
刺人心 2021-02-20 03:10

I want to use jsPDF.html to convert html page to pdf, and I\'m using this code:

savePdf () {
  var pdf = new jsPDF({u         


        
4条回答
  •  执念已碎
    2021-02-20 03:52

    The following two had fixed the issue:

    1. // webpack configuration plugins: [ new webpack.ProvidePlugin({ html2canvas: 'html2canvas' }); ]

    2. window["html2canvas"] = html2canvas;

    even with out the first step its working.

提交回复
热议问题