Multi-page invoices

Geert Janssens janssens-geert at
Thu Feb 28 03:39:59 EST 2013

Since you're asking for code, I'm moving this thread to the 
gnucash-devel mailing list.

Op 27-02-13 23:12, R. Victor Klassen schreef:
> I tried exporting to html, and opening the result in OpenOffice.   That would allow me to do what I need, once or twice.    Not particularly sustainable.
> The next step would be to write an awk script to fix the html so it creates multiple tables, and appropriate headers.    Better than having to edit the invoice in OpenOffice, but nicer not to have to run a script from the command line.
> If someone wants to point me at the code, I would consider doing it right, but I don't know my way around the code at this point.   And only if the solution is in the C code, not the scheme, as this is not how I would choose to learn scheme.
I know more or less all the code parts involved in generating the 
invoice reports. It's mostly scheme though. The only part that's C is 
the integrated webkit html renderer.

Currently, the scheme code generates the invoice as an html file. Given 
GnuCash used to depend on gtkhtml for rendering the html file on screen, 
the html was very basic. We have now switched to webkit, which allows 
for much more advanced webfeatures (css, javascript,...), but most 
reports have not seen an update to take advantage of it.

The html file is all there is. It is displayed on screen, it is sent to 
the printer. It is also the basis for generating a pdf based report in 
the current development versions. It's all the same unchanged base html 

I personally hoped to fix this by making proper use of css, but I never 
had the time to dig in deeply and check if this is at all possible. I 
remember I checked on webkit in this regard and I believe I eventually 
got stuck on a bug in the webkit rendering engine itself. The bug was 
that webkit didn't paginate properly and hence could cut lines in half 
as we see now. I have not followed up since, so I don't know if the bug 
is still present in more recent webkit versions.

What was your plan ? Perhaps I could help you get started.


More information about the gnucash-devel mailing list