D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Crazy questions about html rendering to an image

 

Simon Waters wrote:
> Robin Cornelius wrote:
>> Some of you will probably think WTF?
> 
> Nah we ask ourselves this one every couple of months at work, since it 
> would be really handy for us to have a neat solution.

What i had was almost neat, a hacked up ubrowser implementation that did
this based on xulrunner-1.8. If its any help to you check it out at
http://www.byteme.org.uk/mozlib.html

If you can put up with a fixed xulrunner on a given system then it could
work, It renders to a memory buffer and allows you to retrieve the
pixels and to inject mouse and keyboard events back to the browser to
navigate etc.

With some additional patches its quite usable, but as xulrunner
(mozilla) upstream would never accept such pactches and XULrunner has
moved to 1.9 in debian hope of this ever being included has all but
gone. But its possible still useful.


> 
> khtml2png ?

May be, that's quite interesting, can't navigate as this is one step too
far in the other direction. Basicly part of this takes the images and
renders onto OpenGL surfaces but can also pass mouse events back to the
browser rendering engine.


> 
> One can of course drive a browser to render the page, and grab the 
> content with script driven tools. I'm guessing easier with something 
> like Ephiphany, or Konqueror, which is likely to allow the window 
> manager tools for scripting stuff. But this is lacking in elegance, and 
> prone to browser crashes.

Well thats kind of what the old code was doing, using an xulrunner
implementation. Now if xulrunner had some sane stable API for this kind
of thing there would be no problem but I got the impression that they
were not really interested in this kind of work, based on feedback from
Ubrowsers author.


Robin


Attachment: signature.asc
Description: OpenPGP digital signature

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html