how to use jsPDF and jspdf-autotable in angular 5

后端 未结 10 947
北海茫月
北海茫月 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:34

    In angular-cli.json

    "scripts": [
        "../node_modules/jspdf/dist/jspdf.min.js"
      ],
    

    In your project

    import * as jsPdf from 'jspdf';
    import 'jspdf-autotable';
    

    This work for me

提交回复
热议问题