javascript - "onrendered" in html2canvas not being called -


i using jspdf generate pdf html div. from_html not working using html2canvas function create pdf convert html base64 image , added canvas. don't see error in console, code in onrendered event not being executed. means onrendered not being called. not find wrong. searched lot no beneficial results.

now have added 1 option html2canvas function "logging" : "true", see there log "95534ms html2canvas: document cloned" , after have 404 (invalid sid) post error.

below code snippet :

var doc = new jspdf('p','pt','letter');      widget.log('doc : '+doc+' jspdf : '+ new jspdf());      html2canvas( [divdocedit], {         'logging' : 'true',         onrendered: function( canvas ) {             alert("in onrendered");             console.log("canvas : "+canvas+" divdocedit : "+divdocedit);             var imgdata = canvas.todataurl();                           //var doc = new jspdf('p', 'mm');             doc.addimage(imgdata, 'png', 10, 10);             doc.save('sample-file.pdf');     }     }); 

in above code divdocedit "[object htmldivelement]". feedback/suggestion appreciated. looking forward valuable comments. thanks


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -