views:

39

answers:

2

I would find some example uses of FireFox engine to generate graphic file (it can be png) on server site with using browser engine. I would like achive the same image as if i open this html file in browser and use prinscr.

A: 

You can use Xvfb (virtual frame buffer) to run Firefox in a headless X environment. Do a google search for virtual frame buffer firefox

You can do similar things with webkit (The engine behind Chrome and Safari). For example, look for webkit python qt. There are Qt bindings for other languages too, but the Python ones are by far the best.

troelskn
A: 

As far as I'm aware, this isn't possible server-side without some heavy scripting. It would also be fairly resource-intensive if you want to do it on demand.

The closest you can get is the serverside drawWindow() method on the <canvas> tag, but that is Mozilla-only.

Dave