0

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

Joel Coehoorn
  • 380,066
  • 110
  • 546
  • 781
Laziale
  • 7,633
  • 43
  • 138
  • 244

2 Answers2

1

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.

Daniel Szabo
  • 7,085
  • 6
  • 46
  • 62
0

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.

Eonasdan
  • 7,287
  • 8
  • 52
  • 79