Created
April 2, 2020 14:59
-
-
Save billgeek/70357c69a644b154a39856b76081299c 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.56/pdfmake.min.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.56/vfs_fonts.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
function downloadPdf() { | |
var docDefinition = { | |
content: [ | |
{text:"This is a sample text."} | |
], | |
defaultStyle: { | |
} | |
}; | |
pdfMake.createPdf(docDefinition).open(); | |
} | |
</script> | |
<button onclick="downloadPdf()">PDF with your code</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
estesasetaw asd asd asd