Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function() {
- var specialElementHandlers = {
- '#editor': function(element, renderer) {
- return true;
- }
- };
- $('#printButton').click(function() {
- var doc = new jsPDF();
- doc.fromHTML($('#main-container').html(), 15, 15, {
- 'width': 170,
- 'elementHandlers': specialElementHandlers
- });
- doc.output("dataurlnewwindow");
- });
- });
- Add these scripts in the code
- <script src="js/pdf.js"></script>
- <script src="js/pdf.worker.js"></script>
Add Comment
Please, Sign In to add comment