Webkit status (updated)

Phil Longstaff plongstaff at rogers.com
Mon Mar 30 16:45:15 EDT 2009


This would probably work.  We use goffice to render the chart to a GdkPixbuf.  I could then try grabbing the pixel data and embedding it as you suggest.

Thanks,
Phil




________________________________
From: Thomas Baumgart <ipwizard at users.sourceforge.net>
To: gnucash-devel at gnucash.org
Sent: Monday, March 30, 2009 3:22:11 PM
Subject: Re: Webkit status (updated)

On Monday 30 March 2009 20:23:50 Christian Stimming wrote:

> Sound great! I'll have a look these days.
>
> Am Samstag, 28. März 2009 23:28 schrieb Phil Longstaff:
> > It turned out to be simple to look through the html string for an
> > <object> tag, then remove it and pass it to an object handler.  The
> > object handlers used by gnc_html_webkit parse this string for the info
> > put into the html string by
> > html-barchart.scm/html-piechart.scm/html-linechart.scm/html- scatter.scml
> > and use that to pass to gog to create the graph pixbuf.  The pixbuf is
> > then saved to /tmp as a png image, and the original <object> string is
> > replaced by a new <img> string with a reference to the image.
>
> Err... saving images into /tmp and embedding them through <img> is a good
> idea to get the new engine up and running. However, in the long run this is
> probably not so good a solution, because saving temporary files somewhere
> on disk opens up a new can of worms. Privacy issues about the pictures with
> financial data being the most prominent, I guess. Are there other solutions
> for picture embedding available in the long run?

Why don't you use <IMG SRC="data:image/png;base64,%1" ALT="title"> while 
replacing %1 with the base64 encoded data of the png version of your image. 
That's the way we do it in KMyMoney. Don't know if you can use other picture 
formats or if that even works in your environment.

> > What configuration policies do we want?  If webkit is available, use it
> > and otherwise fall back to gtkhtml?  Require webkit and never use gtkhtml
> > again? Once I have modified configure.in appropriately and done a bit of
> > cleanup, it will be ready to move to trunk.
> >
> > The same trick could also be used for gtkmozembed in case we want to
> > embed gecko instead.  Support for gtkmozembed in gnucash is just
> > preliminary but can be easily modeled after the webkit support.
> >
> > Thoughts?
>
> I think gtkhtml can be removed completely quite soon, as soon as several
> developers have confirmed all required features are available.
>
> Gruß
>
> Christian

-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
Technology is a constant battle between manufacturers producing bigger and
more idiot-proof systems and nature producing bigger and better idiots.
-------------------------------------------------------------


More information about the gnucash-devel mailing list