Printing the contents of a canvas tag

I am making an application canvas. I upload more images (png, gif) to the canvas. When I click print in the browser (opera), the contents of the canvas tag is not printed. In other browsers (FF, IE, Chrome) there are no problems. Why?

+3
source share
1 answer

this answer from Can be useful capture HTML Canvas as gif / jpg / png / pdf? .

var canvas = document.getElementById("mycanvas"); var img = canvas.toDataURL("image/png"); 

with a value in IMG, you can write it as a new image like this:

 document.write('<img src="'+img+'"/>'); 
+3
source

All Articles