Answer the question
In order to leave comments, you need to log in
How to make Safari work with CORS html2canvas correctly?
Please tell me how to make Safari work with CORS. c in the finished "screenshot" the image is missing.
$scope.htmlToPDF = function(html, name) {
if (name === undefined) {
name = 'file.pdf';
}
html2canvas(html, {
logging: true,
useCORS: true,
onrendered: function (canvas) {
var img = canvas.toDataURL("image/png")
var doc = new jsPDF();
doc.addImage(img, 'PNG', 15, 0, 180, 0);
setTimeout(function(){
doc.save(name);
}, 1000);
}
});
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question