brsy nah mang May 12, 2011 1,530 272 Nov 13, 2014 #1 I've tried jsPDF and it hasn't work. Anyone have an idea? I want a specific div (let's call it #target) to be converted into a PDF when the I click a link that says "download to PDF".
I've tried jsPDF and it hasn't work. Anyone have an idea? I want a specific div (let's call it #target) to be converted into a PDF when the I click a link that says "download to PDF".
JayC Always Learning Aug 8, 2013 5,497 1,398 Nov 14, 2014 #2 Go to You must be registered for see links and download the latest Version. Include the following Scripts in your project: jspdf.js jspdf.plugin.from_html.js jspdf.plugin.split_text_to_size.js jspdf.plugin.standard_fonts_metrics.js var doc =new jsPDF(); var elementHandler ={ '#ignorePDF':function(element, renderer){returntrue; }}; var source = window.document.getElementsByTagName("#target")[0]; doc.fromHTML( source,15,15,{'width':180,'elementHandlers': elementHandler }); doc.output("dataurlnewwindow"); source: You must be registered for see links Upvote 0 Downvote
Go to You must be registered for see links and download the latest Version. Include the following Scripts in your project: jspdf.js jspdf.plugin.from_html.js jspdf.plugin.split_text_to_size.js jspdf.plugin.standard_fonts_metrics.js var doc =new jsPDF(); var elementHandler ={ '#ignorePDF':function(element, renderer){returntrue; }}; var source = window.document.getElementsByTagName("#target")[0]; doc.fromHTML( source,15,15,{'width':180,'elementHandlers': elementHandler }); doc.output("dataurlnewwindow"); source: You must be registered for see links
brsy nah mang May 12, 2011 1,530 272 Nov 16, 2014 Thread starter #3 I tried that already, but it I couldn't get it to work. Copying and pasting it from Stackoverflow isn't going to help me. Upvote 0 Downvote
I tried that already, but it I couldn't get it to work. Copying and pasting it from Stackoverflow isn't going to help me.