How to set image to fit width of the page using jsPDF?

后端 未结 11 2154
醉话见心
醉话见心 2020-12-04 21:37

Is there any way to solve this? I tried to set width and height in mm. How can I set it to full-width?

11条回答
  •  一整个雨季
    2020-12-04 22:24

    The API changed since this commit, using version 1.4.1 it's now

    var width = pdf.internal.pageSize.getWidth();
    var height = pdf.internal.pageSize.getHeight();
    

提交回复
热议问题