Created
February 27, 2023 11:19
-
-
Save vipulyadav150/75fb90488ce64c4f9d8064e9462b8a46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function downloadPDF() { | |
var pdf = new jsPDF('p', 'pt', 'a4'); | |
$("#button-pdf").attr('hidden', 'true') | |
pdf.addHTML($("#mainContainer"), 0, -20, { allowTaint: true, useCORS: true, pagesplit: false }, function () { | |
pdf.save('{{downloaded_file_name}}.pdf'); | |
$("#button-pdf").removeAttr('hidden', 'true') | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment