You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: This question/issue has been established to guide proxy servers.
If my html/script is on a domain like this http://www.example.com and the proxy in another like this http://proxy.example.com (or http://www.example2.com) the script fails to convert the images to canvas, see example:
<script>
//<![CDATA[
(function() {
window.onload = function(){
html2canvas(document.body, {
"logging": true, //Enable log (use Web Console for get Errors and Warnings)
"proxy":"http://proxy.example.com/html2canvasproxy.php", //or "proxy":"http://www.example2.com/html2canvasproxy.php"
"onrendered": function(canvas) {
var img = new Image();
img.onload = function() {
img.onload = null;
document.body.appendChild(img);
};
img.src = canvas.toDataURL("image/png");
}
});
};
})();
//]]>
</script>
Script show this error:
Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': tainted canvases may not be exported.
And the proxy don't support SVG images.
The text was updated successfully, but these errors were encountered:
If my html/script is on a domain like this
http://www.example.com
and the proxy in another like thishttp://proxy.example.com
(orhttp://www.example2.com
) the script fails to convert the images to canvas, see example:Script show this error:
And the proxy don't support SVG images.
The text was updated successfully, but these errors were encountered: