'; var converted = htmlDocx.asBlob(content); triggerDownload(converted, fileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); } else if(format === "pdf") { var opt = { margin: 0.5, filename: fileName + ".pdf", image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2 }, jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' } }; html2pdf().set(opt).from(element).save(); } else if(format === "txt") { var text = getPlainText(element.innerHTML); triggerDownload(text, fileName + ".txt", "text/plain"); } } // Attach download event listeners document.getElementById("download_doc").addEventListener("click", function(){ downloadAs("docx", "report_"); }); document.getElementById("download_txt").addEventListener("click", function(){ downloadAs("txt", "report_"); }); document.getElementById("download_pdf").addEventListener("click", function(){ downloadAs("pdf", "report_"); }); }); //# sourceURL=mediatore-pro-script-js-after /* ]]> */