📜  html2pdf - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:00.303000             🧑  作者: Mango

代码示例1
function generatePDF() {
  // Choose the element that our invoice is rendered in.
  const element = document.getElementById("invoice");
  // Choose the element and save the PDF for our user.
  html2pdf()
    .set({ html2canvas: { scale: 4 } })
    .from(element)
    .save();
}