简体   繁体   English

ASP.NET截图页面

[英]ASP.NET screenshot page

Related Stack Overflow question is Programmatically get a screenshot of a page . 相关的Stack Overflow问题是以编程方式获取页面的屏幕截图

My users will be logged into a private system, and I want to have a button on the page that says "Take Screenshot". 我的用户将登录到私人系统,我想在页面上有一个“按屏幕截图”的按钮。 This will link into the support system, and when they take the screen shot, it creates a new ticket with the screen shot as an automatic attachment. 这将链接到支持系统,当他们拍摄屏幕截图时,它会创建一个新的票证,屏幕截图为自动附件。

Content is variable, depending on who you are logged in as! 内容是可变的,具体取决于您登录的人员! This means I can't use an external screen shotting tool. 这意味着我无法使用外部屏幕截图工具。

Ideally, I would like all the HTML to be rendered to a bitmap which is saved to a disk. 理想情况下,我希望将所有HTML呈现为一个保存到磁盘的位图。 Is there some sort of server-side Internet Explorer component that can render the HTML and save it as a BMP? 是否有某种服务器端Internet Explorer组件可以呈现HTML并将其另存为BMP?

Kierren made good points. 基尔伦提出了很好的观点。 If I can grab the HTML via JavaScript, is there any server-side plugin that can render the HTML as an image as viewed through Internet Explorer? 如果我可以通过JavaScript获取HTML,是否有任何服务器端插件可以将HTML呈现为通过Internet Explorer查看的图像?

I did some unsuccesful attempts with that in the past. 我过去曾做过一些不成功的尝试。 I could not get the solution which works seemlessly but here are some I have had near-sucess (ie for most of the URLs) [Since I was doing POC, results did not matter] See if that helps 我无法得到无缝工作的解决方案,但这里有一些我已经接近成功(即对于大多数URL)[因为我做POC,结果无所谓]看看是否有帮助

WebBrowser.DrawToBitmap() or other methods? WebBrowser.DrawToBitmap()还是其他方法?

http://www.codeproject.com/KB/graphics/html2image.aspx http://www.codeproject.com/KB/graphics/html2image.aspx

I have not heard of an HTML -to-bitmap converter before, but there are definitely HTML-to- PDF options, 我没有听说过的的HTML -to-位图转换器之前,但也有一定的HTML TO- PDF选项,

http://www.htm2pdf.co.uk/ http://www.htm2pdf.co.uk/

and

http://html-pdf-converter.com/ http://html-pdf-converter.com/

to name a couple. 命名一对。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM