Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Download pdf

downloadPdfDocument = () => {
    const input = document.getElementById("GrabbedText");
    const pdfName = "Insight";
    html2canvas(input).then((canvas) => {
      const imgData = canvas.toDataURL("image/png");
      const pdf = new jsPDF();
      pdf.addImage(imgData, "JPEG", 38, 0);
      pdf.save(`${pdfName}.pdf`);
    });
  };
 
PREVIOUS NEXT
Tagged: #Download #pdf
ADD COMMENT
Topic
Name
9+8 =