how to use jsPDF and jspdf-autotable in angular 5

后端 未结 10 863
北海茫月
北海茫月 2021-01-06 01:46

I am trying to use jsPDF and jspdf-autotable in my Angular 5.2.0 project. My package.json is below (related parts):

\"dependencies\": {
    ...
    \"jspdf\"         


        
10条回答
  •  北荒
    北荒 (楼主)
    2021-01-06 02:46

    Declare doc as any type. That will fix the error "[ts] Property 'autoTable' does not exist on type 'jsPDF'."

    let doc:any = new jsPDF('l', 'pt');

提交回复
热议问题