Answers for "pdf table files download react not working"

1

pdf table files download react not working

let page = document.getElementById("divToPrint"); 
html2PDF(page, {
      jsPDF: { unit: "pt", format: "A4", orientation: "portrait" },
      imageType: "image/jpeg",
      output: "./pdf/generate.pdf",
    });
Posted by: Guest on December-04-2020
1

pdf table files download react not working

let input = document.getElementById("divToPrint"); 

html2canvas(input)
  .then((canvas) => {
    const imgData = canvas.toDataURL('image/png');
    const pdf = new jsPDF();
    pdf.addImage(imgData, 'PNG', 0, 0);
    pdf.save("download.pdf");  
  });
;
Posted by: Guest on December-04-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language