I try to print screen of my page and then save it into base64
, it works good but it looks like that svg elements are ignored, and some css styles work bad, like :before
and :after
, original page looks -
but after conversion it looks like this -
You can see the circle on right side is ignore, and arrow in top menu and same :before
and :after
on tabs and add new tab button (+). My convert code looks -
printOnePage(){
document.getElementById('helpPage').style.display= 'none';
let page = document.getElementById('appContainer');
html2canvas(page,{
onrendered: function(canvas) {
$('#img_val').val(canvas.toDataURL("image/png"));
console.log(document.getElementById('img_val'));
//document.getElementById("phpSendForm").submit();
}
});
document.getElementById('helpPage').style.display= '';
}
Any tips what can cause this ?