-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
Thank you for submitting an issue to jsPDF. Please read carefully.
I'm using flask and I found this code online for generating pdf's from a HTML div. The div is rendered from jquery load()
Are you using the latest version of jsPDF?
yes
Have you tried using jspdf.debug.js?
yes
Steps to reproduce
$(document).ready(function(){
$('#pdfcon').click(function(){
var specialElementHandlers = {
'#editor': function (element,renderer) {
return true;
}
};
$('#pdfcon').click(function () {
var doc = new jsPDF();
var source = $('#pdfco').html();
var specialElementHandlers = {
'#editor': function (element, renderer) {
return true;
}
};
doc.fromHTML(source, 0.5, 0.5, {
'width': 75,'elementHandlers': specialElementHandlers
});
doc.output("dataurlnewwindow");
});
});
});
The error:
Uncaught TypeError: element.className.split is not a function
at elementHandledElsewhere (jspdf.debug.js:7215)
at DrillForContent (jspdf.debug.js:7426)
at DrillForContent (jspdf.debug.js:7427)
at DrillForContent (jspdf.debug.js:7427)
at DrillForContent (jspdf.debug.js:7427)
at DrillForContent (jspdf.debug.js:7427)
at DrillForContent (jspdf.debug.js:7427)
at DrillForContent (jspdf.debug.js:7427)
at jspdf.debug.js:7595
at done (jspdf.debug.js:7470)