title: Saving a web page as image
body: <p>As a hobby project I am exploring the ways to save a web page (HTML) as image, <strong>mostly programatically</strong> using c/c++/javascript/java. Till now I have come across the following ways:</p>
  
  <ol>
  <li><p>Get the <code>IHTMLElement</code> of page body and use it to query for <code>IHTMLElementRender</code> and then use its <code>DrawToDC</code> method (<strong>Ref:</strong> <a href="http://www.codeproject.com/KB/IP/htmlimagecapture.aspx" rel="nofollow">http://www.codeproject.com/KB/IP/htmlimagecapture.aspx</a> ). But the problem is that it did not work for all the pages (mostly pages having embedded iframes).</p></li>
  <li><p>Another way which i can think of is to use some web browser component and when the pages is fully loaded then capture it using <code>BitBlt</code> (<strong>Ref:</strong> <a href="http://msdn.microsoft.com/en-us/library/dd183370%28VS.85%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/dd183370%28VS.85%29.aspx</a> ). But the problem is that the page I have requested may be longer than my screen size and it will not fit into the web browser component.</p></li>
  </ol>
  
  <p>Any direction/suggestion to resolve above issues or an alternative approach is greatly appreciated.</p>