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

 

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.

> but are there any libraries (or
> ways of using libraries) that can render webpages to a memory buffer
> that can be grabbed as a image directly? Mozilla xulrunner 1.8 was
> doing this for me the upgrade to 1.9 destroyed everything and its such
> a mess now i really don't want to go there. I can't just use 1.8 as i
> want to work with things that are in debian or can be added and
> xulrunner-1.8 is therefor a step backwards and a fork of that is a
> truly unmanageable concept and would be unlikely to be accepted into
> Debian for such a specific application not to mention the unmanageable
> security of (a fork of) such a large code base.

khtml2png ?

It does require an X session but there is a hack in the FAQ to do the 
minimal necessary on headless servers.

I forget why we didn't use this last time we looked, but whatever the 
issue it may have been improved. I suspect just the poverty of khtml at 
the time, but the CSS support is much improved since then.

> Though i would ask here as there is quite a breath of knowledge and
> some one may have seen something.

There are some commercial services.

One of those things that should be easy, but few folks bother to 
maintain as the web is a moving target.

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.

If you find a really good solution let me know!!!!

-- 
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