简体   繁体   中英

ASP.NET screenshot page

Related Stack Overflow question is Programmatically get a screenshot of a page .

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. Is there some sort of server-side Internet Explorer component that can render the HTML and save it as a 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?

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

WebBrowser.DrawToBitmap() or other methods?

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,

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

and

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

to name a couple.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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