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 i开发者_运维技巧t 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.
精彩评论