Pdf file size too big created using jspdf

前端 未结 5 1950
温柔的废话
温柔的废话 2020-12-04 15:57

I am using jspdf for creating PDF inside browser. I am having multiple charts having svg as chart Data. For adding data to pdf I am converting svg to png using canvas and th

5条回答
  •  一生所求
    2020-12-04 16:44

    If you add several images to one document, use

    pdf.addImage(png, 'PNG', leftmargin, 120, 485, 270, undefined,'FAST');
    

    not

    pdf.addImage(png, 'PNG', leftmargin, 120, 485, 270,'','FAST');
    

    otherwise the first image will substitute all others.

提交回复
热议问题