After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 168803 - Exporting Reports with graphs
Exporting Reports with graphs
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Reports
git-master
Other All
: Normal normal
: ---
Assigned To: Phil Longstaff
linas
Depends on: 580350
Blocks:
 
 
Reported: 2005-02-28 18:44 UTC by Dennis Schaaf
Modified: 2018-06-29 20:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dennis Schaaf 2005-02-28 18:44:07 UTC
Please describe the problem:
When I try to export reports that contain graphs gnuCash just creates an empty
html file.

Also it is not clear that the export can only do html files. The first time I
ran export I triped to save as .jpg and it created a html file named foo.jpg

Steps to reproduce:
1. In gnuCash go on reports and create any report that contains a graph
2. In the report window click on Export 
3. Save export to "foo.html"


Actual results:
An empty HTML file is saved

Expected results:
A HTML file with a nice graph 

Does this happen every time?
Yes

Other information:
Comment 1 Christian Stimming 2005-03-01 09:55:26 UTC
Yes, that's true -- the current graphing code, which uses the graphical library
"Guppi" which is a dead project, can only produce the on-screen diagrams *and*
print these to postscript, but it cannot export these diagrams into pictures
that are embedded in a HTML-file. In other words, you can only print the
diagrams to postscript but not export them to HTML. 

This is not going to change before the gnome2 port is completed, because we need
to switch to a different graphical library before anything related to this can
be changed. See http://gnomesupport.org/wiki/index.php/GnuCashPortingStatus for
the porting status.
Comment 2 Christian Stimming 2005-11-15 14:19:15 UTC
The gnucash-1.8.x series is no longer developed. We may keep this enhancement
request as a reminder, though.
Comment 3 Josh Sled 2006-02-24 01:03:38 UTC
Definitely keep it as a reminder.
We should be able to coax anything into giving us a PNG; GOG supports SVG export, too.  But it looks like gtkhtml doesn't support saving <object /> data.  Because it sucks ass.
Comment 4 Fred Blaise 2007-01-03 11:46:11 UTC
This is still valid for me with version 2.0.4 on opensuse 10.2. This is a real problem not to be able to export these reports. This shouldn't be tagged 'enhancement' anymore, but brought up higher.

What's the status on this? 

Thank you.
Comment 5 Josh Sled 2007-01-03 15:24:29 UTC
(In reply to comment #4)
> This is still valid for me with version 2.0.4 on opensuse 10.2. This is a real
> problem not to be able to export these reports. This shouldn't be tagged
> 'enhancement' anymore, but brought up higher.
> 
> What's the status on this? 

There's no change on this.

I wonder if the more recent gtkhtml supports getting at <object />s, or if the more recent GOG makes it trivial to create a PNG.

In any case, I hesitate to do so, but I've raised the severity to Normal -- a minor part of the component (Reports, export, graphs) does not work.

(FWIW, Fred, it's not going to get fixed any faster at Normal than at Enhancement.)
Comment 6 datakid 2007-08-08 00:49:35 UTC
I can confirm this using GnuCash 2.0.5 on Ubuntu 7.04, feisty fawn...and I can confirm that it's frustrating....
Comment 7 Beto Zamora 2009-01-01 15:06:33 UTC
2.2.8, still doesn't have this needed feature... Frustration also confirmed.
Comment 8 Phil Longstaff 2009-04-26 19:37:33 UTC
GtkHtml provides a callback when it encounters a <object> tag, and gnc-html then calls gog to create the image as a GdkPixbuf and then embed it in the web page.  For the webkit port, there is no <object> callback.  Therefore, gnc-html-webkit pre-parses the html string, finds the <object> tag, calls gog with the parameter values from the <object> to create a GdkPixbuf, then converts the pixels to png/base64 and embeds the html <img> in the original where the <object> was.  Result is a graph that displays in webkit.  In addition, gnc-html-webkit saves the html passed to webkit and handles the export itself by writing that html to a file.

This fix is targetted for 2.4.  I can also convert gnc-html-gtkhtml to use these two features (convert graph to embedded <img> and do the export rather than getting gtkhtml to do it) for those who can't build 2.4 with webkit.
Comment 9 Phil Longstaff 2009-06-20 22:59:59 UTC
It turns out that gtkhtml (at least the version I have on Ubuntu 9.04) doesn't support inline images.  Therefore, this will only be possible using webkit.
Comment 10 John Ralls 2018-06-29 20:50:37 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=168803. Please update any external references or bookmarks.