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
  • 399,467
  • 113
  • 570
  • 794
Laziale
  • 7,965
  • 46
  • 146
  • 262

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,181
  • 6
  • 48
  • 65
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,563
  • 8
  • 55
  • 82