html2png - thumbnails for pages

Stuart Jansen sjansen at buscaluz.org
Sat Aug 12 15:14:34 MDT 2006


On Sat, 2006-08-12 at 11:21 -0600, Matthew Frederico wrote:
> Ok, I have looked high and low, downloaded script after script ...
> Does anyone know of some way to take a snapshot of a rendered web page
> and convert it to png?  Some command line utility that perhaps takes
> advantage of the gecko engine or something akin to that?
> 
> I've seen the script that requires you to keep a browser window open
> and it takes snapshots of what the browser renders, but that's
> obviously not going to work.  I need it to work on a server basis.
> 
> even if there is a commercial linux app to do it, I'd be happy.
> 
> I'm very much at a loss here.

Here's an example of a Ruby script that uses gtkmozembed to capture
screenshots.

http://ruby-gnome2.sourceforge.jp/hiki.cgi?RubyGecko#MozSnapshooter+%
28HTML+page+thumbnailer%29

However, there's a catch and a possible solution.

I've only spent a couple of minutes poking at the the GTK version of
Gecko and I'm starting to suspect it's going to require a display to
work.

Xvfb is a display that requires no hardware. It used to be used with
some stupid Java libraries that required a display to work. You might be
able to use it to solve your current problem too.

-- 
Stuart Jansen              e-mail/jabber: sjansen at buscaluz.org
                           google talk:   stuart.jansen at gmail.com

"However beautiful the strategy, you should occasionally look at 
the results." -- Winston Churchill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://plug.org/pipermail/plug/attachments/20060812/626629c0/attachment.bin 


More information about the PLUG mailing list