Hi,
You can use the embedding APIs to integrate Gecko layout/printing
functionality into your own application. See
http://developer.mozilla.org/en/docs/Embedding_Mozilla . Alternatively,
you could make an XULRunner application which uses the printing APIs.
Dumping a webpage to a PDF is not implemented. It actually wouldn't be
very hard to implement on the trunk, but nobody has done it. It could be
an interesting project to implement PDF dumping for webpages.
An alternative if you're looking to dump screen output is to use
<canvas> with drawWindow and toDataURL to get a raster image of a
webpage using Gecko >= 1.8.1. Not especially pretty or fast, but doable.
-Eli
Ilya Schurov wrote:
Hi list,
I would like to use Gecko layout engine in order to convert my HTML/CSS
documents (with images, background, etc.) into some printable media like
PDF or SVG or high-resolution JPEG image. Is it possible to do so --
i.e. to "grab" rendering output to some kind of file? I can't simply use
Firefox printing functionality, because I would like to incorporate it
into the standalone application.
I didn't find anything on this topic in the docs -- just unanswered
question in the wiki [1] concerning invoking Gecko engine from the shell.
1. http://wiki.mozilla.org/Gecko:Frequently_Asked_Questions
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout