Link to home
Start Free TrialLog in
Avatar of REA_ANDREW
REA_ANDREWFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Convert HTML to Image

Hi,

Can anybody give me an example or point me in the direction of a tutorial which shows me code to convert HTML code into an Image of that renedered code, i.e. a web page

Thanks in advance

Andrew
Avatar of vo1d
vo1d
Flag of Germany image

that is not so easy as expected.
you have to possibilities:
1. you can make a screenshot from the visible area(the webbrowsers cliprectangle), then you have to scroll by code down to teh next page and grab another screenshot. do it as often as you need until you reached the bottom. at least, you will have to put all that screenshots together.
the page down message can be send like this:
this.webBrowser1.Focus();
SendKeys.Send("{PGDN}");

2.you will have to go through the htmldocument object and render all of its htmlelements by hand in a new graphicsobject of a bitmap.
the initial size of that bitmap has to be
Avatar of REA_ANDREW

ASKER

have you got any code that could get me on my way with this. I particular this part


"render all of its htmlelements by hand in a new graphicsobject of a bitmap"

thanks

Andrew
ASKER CERTIFIED SOLUTION
Avatar of vo1d
vo1d
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial