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
Asked
Active
Viewed 504 times
0
-
1possible duplicate of [Taking screenshot of ASPX page](http://stackoverflow.com/questions/5172478/taking-screenshot-of-aspx-page) – n8wrl Jul 28 '11 at 18:41
-
What format do you need the screenshot in? – Daniel Szabo Jul 28 '11 at 18:42
-
@n8wrl Thanks, I will check that link. at ajax81 jpeg – Laziale Jul 28 '11 at 18:46
2 Answers
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
-
While this solution is very cool, IE doesn't support the method by which it generates the image. – Daniel Szabo Jul 28 '11 at 19:12
-
yeah sorry, didn't realize my edit got cut off from the < sign. flashcanvas is supposed to let it work with IE – Eonasdan Jul 28 '11 at 19:25