[英]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. 我需要开发一项新功能,用户可以通过asp.net页面在浏览器中对内容进行屏幕截图,然后将其自动另存为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
在此先感谢,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. 这是指向教程的链接,该教程用于获取jpg,bmp,png等快照。
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. 如果您需要将其转换为pdf格式,建议您使用wkhtmltopdf之类的程序,或者使用教程中的信息,然后将该图像粘贴到pdf中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.