How do I save a web page to image

Yuval Peled picture Yuval Peled · Mar 31, 2009 · Viewed 9.2k times · Source

I have a WebBrowser control and I want to save the whole page viewed to image (any web page). I tried using IHTMLElementRender interface but it didn't work for all web pages. Maybe I'm doing something wrong because sometimes the snapshot included the scrollers and sometimes it was just partial. Do you have a working example that can save the whole web page to an image?

Thanks.

Answer

John T picture John T · Mar 31, 2009

There is a great CodeProject article that shows hows to accomplish this task using the IE engine. If you prefer to use another browser's rendering engine, this is a good place to start learning. There is also an addon for Firefox which will do this, you could dig into the internals of it to get insight on how to accomplish this in firefox.