[http://lxr.mozilla.org/mozilla/source/camino/src/embedding/CHBrowserListener.mm This] was marked as a good example, but no line number was given.
=== How do I HTML as an image ===
There is a test application that allows you to take a snapshot of rendered HTML and save it as an image. The program and code is available [http://ubrowser.com/testapps.php here]
=== Why does TestGTKEmbed give an error message when I download something and 'save as/ open with' pops up? ===
You have to implement your own download UI as gtkmozembed doesn't have one. Alternatively, you can download files using nsIWebBrowserPersist if UI isn't a concern.