Hi I want to render a HTML generated invoice with jsPDF, but when I try to render an error occurs saying me
Uncaught TypeError: Cannot read property 'length' of undefined jspdf.plugin.from_html.js:233
tried to fix it by my self... unsuccessful...
I have the plugins jspdf.plugin.standard_fonts_metrics, jspdf.plugin.split_text_to_size, jspdf.plugin.from_html bound in.
Here the code I use for render:
var doc = new jsPDF('p', 'in', 'letter');
var source = $('#invoiceTemplate');
doc.fromHTML(
source,
0.5,
0.5,
{
'width': 7.5,
'elementHandlers': {}
});
doc.output('dataurlnewwindow');
I think the problem starts in line 223 of the fromHTML plugin with the childNodes thing...
cns = element.childNodes;
Thank you in advance!