简体   繁体   中英

Save current page to image

I'm working on a project which requires to save the current page in an image. I found some examples in Javascript to create a blob of page, but what I would like to do is save the page in a file.

My question is, is it possible to save the content of a page in an image file?

Does a plugin exist to do it directly ?

If not, is it possible to save the blob and render the blob in C# to create an image?

To save a page as an image, you can use http://html2canvas.hertzen.com/

Example:

var canvas = document.getElementById("mycanvas");
var img    = canvas.toDataURL("image/png");
document.write('<img src="'+img+'"/>');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM