khtml2png results without khtml2png

Paul Hammond mail at
Tue Feb 7 19:31:22 GMT 2006

On 7 Feb 2006, at 17:28, Chisel Wright wrote:

> At $workplace we'd like to take local HTML (with assets) and  
> generate a
> thumbnail of the rendered page.
> We've found khtml2png, but that requires KDE to be installed, and it's
> not really something that we can sanely run on a server.
> [scary stuff with taking actual screenshots as I understand]
> Has anyone already been down this road and have a [perl based if
> possible] solution?

Things worth investigating (aside from khtml2png) include http:// (several links on that page)  
and (requires a mac and python,  
apologies for the self promotion).

There are others, but the common theme behind all of these scripts is  
that they all require access to an x/vnc/window server of some  
description - few of the browsers offer programmatic access to the  
rendered page, and none of them will run without access to a display,  
so if running a vnc/x server is not possible then you quickly run out  
of options.

If getting the graphics from a third party is acceptable, I know of  
at least one person planning to offer http based access to  
webkit2png.  There's also

> I feel like there ought to be a way to do something along the lines of
> using some html rendering library (gecko?) to render straight to
> jpg/png, but googling hasn't come up with anything I've been able to
> see.

Again, only problem is getting code that uses this functionality to  
run without access to X.

I'd be really interested in any other solutions you find to this  


More information about the mailing list