On 20.11.2007 15:19, [EMAIL PROTECTED] wrote: > This may be a little bit naive - I've only just started looking at > Gecko today - but I cannot see an obvious way to retrieve a page > rendered in Gecko into a device-independent memory buffer, e.g. as a > bitmap. To cut a long story short, I'm interested in using Gecko to > render some HTML, without actually displaying the HTML in a browser > window (or any window for that matter!) but instead saving the > rendered information away to some sort of image.
I'm really no expert on this, but as nobody else told you this, I will: Gecko 1.9 will use cairo for rendering and cairo supports several different surface types (including PDF and PNG as output) you could in principle render directly to one of those surfaces. I know that at least on Linux and Windows the PDF surface can be used to print to file. If you search for "gfxPDF" on http://mxr.mozilla.org/seamonkey/ this might give you a hints. I don't see why this shouldn't be possible with a PNG surface. Of course then you have to create a build that actually compiles in the the code to create a PNG surface. > Assuming this is possible (lets be honest, it's probably not exactly > what Gecko was designed for), is this something that is likely to be > do-able in a reasonably cross-platform sense? Or am I likely to be > dealing with HDCs on Windows and some form of GTK object, or lower > level primitive under Linux? As those surfaces are all platform independent in cairo anything that you invent should work for all platforms. Peter. _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

