I try to use javascript library JSPDF for export my OpenLayers map but it doesn't work. I create my HTML :
generate PDF And my Javascript :
$(document).ready(function () { var doc = new jsPDF(); var specialElementHandlers = { '#editor': function (element, renderer) { console.log(1); return true; } }; $('#cmd').click(function () { var html=$("'#index_map").html(); console.log (html); doc.fromHTML(html, 200, 200, { 'width': 500, 'elementHandlers': specialElementHandlers }); doc.save('test.pdf'); }); }); And when I click on my button I've the message "doc.fromHTML is not a function"
أكثر...
generate PDF And my Javascript :
$(document).ready(function () { var doc = new jsPDF(); var specialElementHandlers = { '#editor': function (element, renderer) { console.log(1); return true; } }; $('#cmd').click(function () { var html=$("'#index_map").html(); console.log (html); doc.fromHTML(html, 200, 200, { 'width': 500, 'elementHandlers': specialElementHandlers }); doc.save('test.pdf'); }); }); And when I click on my button I've the message "doc.fromHTML is not a function"

أكثر...