简体   繁体   中英

asp.net screenshot

I need to work on a new feature where a user can make a screenshot of the content in the browser via asp.net page and save it automatically as jpeg. Is there a example or someone can give me some idea how I can do that? I will really appreciate. Thanks in advance, Lazile

The long and short of it is that you'll need to render the page on the server and take a picture of it. Depending on your format needs, there are a variety of ways to do this.

Here's a link to a tutorial for getting a snapshot in jpg, bmp, png, etc.

If you need to get it to pdf format, I would recommend either using a program like wkhtmltopdf , or using the information from the tutorial and then pasting that image into a pdf.

check this out. It's javascript on the client side. It might meet your needs with some tweaking. Edit: caveat is that it doesn't work in <IE9 as it uses HTML 5 canvas.

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