我在我的reactJs中使用jsPdf,我正在将html下载到pdf。它下载正确,但页面更改后我的内容正在剪切页面

问题描述 投票:0回答:0

enter image description here 你可以看到图片是什么问题

这里是下载pdf的功能:-

const handleGeneratePdf = () => {
    const doc = new jsPDF({
      format: "a1",
      unit: "px",
      orientation: "p",
      putOnlyUsedFonts: true,
    });

    // Adding the fonts
    doc.setFont("Inter-Regular", "normal");
    doc.html(reportTemplateRef.current, {
      async callback(doc) {
        await doc.save("document");
      },
    });
  };

请解决这个问题

javascript reactjs jspdf
© www.soinside.com 2019 - 2024. All rights reserved.