I have a string with whole html from web page.
I want to save this string as image with all html rules.
At the end to have image from webpage. How can I solve it with c# and asp.net?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
You can convert a HTML file to a PDF by using the following component:
http://code.google.com/p/wkhtmltopdf/
Then use ghostscript to convert the PDF to an image.
Method 2
You can use this project as a source of inspiration for your code.
http://www.codeproject.com/KB/graphics/IECapture.aspx
Of course, this is a regular Winform-application
Or this component:
http://www.acasystems.com/en/web-thumb-activex/faq-convert-html-to-image-in-asp.net.htm
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0