[webkit-help] Rendering HTML page to bitmap
matthewj at adobe.com
Wed Jul 13 14:49:43 PDT 2011
I can set the viewport properly via CEF. The problem, as I mention, in my followup to the first responder is that in order to preserve the correct rendering I can't change the viewport size but I haven't found a way (there currently isn't one via CEF) to get the full page captured to a bitmap without doing that.
I can't completely tell from the QtWebKit post, but it looks like the utility is not capturing the full page, just what is in the defined viewport. Is that correct?
From: Ariya Hidayat [mailto:ariya.hidayat at gmail.com]
Sent: Wednesday, July 13, 2011 4:41 PM
To: Matthew Johnson
Cc: webkit-help at lists.webkit.org
Subject: Re: [webkit-help] Rendering HTML page to bitmap
This is really specific to the port/framework you are using (thus, more like CEF question). The trick is to set the viewport properly.
For QtWebKit, refer to what I showed ages ago:
http://labs.qt.nokia.com/2008/11/03/thumbnail-preview-of-web-page/ or even using http://code.google.com/p/phantomjs/wiki/QuickStart#Rendering.
Capturing the WebView in a single bitmap sounds like a good idea. Even better if you can do it in several steps by setting a proper clipping rect.
More information about the webkit-help