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

 

On Thursday 04 September 2008 16:52, Robin Cornelius wrote:
> Hi Everyone,
>
> Some of you will probably think WTF? 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.
>
> Alternatively any ways i can "grab" the rendered output of a Gtk
> Widget? i can get a webkit Gtk widget running in a few lines of code
> but this just uses standard Gtk and i presume that what i am trying to
> do requires hacking in to a much lower level that no one ever designed
> anything to do.
>
> Though i would ask here as there is quite a breath of knowledge and
> some one may have seen something.
There are screengrabbers for most operating systems - some of the Linux ones 
allow you to just take an apps window so scripting seems like a good bet
In majorly dire pseudo code

$window = firefox http://"your webpage url"
screengrab $window file
close $window

Tom te tom te tom


>
> Thanks
>
> Robin


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