Printing The Contents Of The Canvas Tag
I make an application canvas. I load more image (png, gif) in canvas. When I click print on my browser (opera), the contents of the canvas tag does not print. With other browsers (
Solution 1:
this answer from Capture HTML Canvas as gif/jpg/png/pdf? might be useful.
var canvas = document.getElementById("mycanvas");
var img = canvas.toDataURL("image/png");
with the value in IMG you can write it out as a new Image like so:
document.write('<img src="'+img+'"/>');
Post a Comment for "Printing The Contents Of The Canvas Tag"