printer page transitions

R. Victor Klassen rvklassen at
Sat May 2 11:42:51 EDT 2015

I looked into this the other year.  It turns out that CSS has a directive that indicates that a block of text is not to be broken across pages when the page is printed.

Sadly, implementation of that director in html renderers is optional.  We no longer have the client that drove my need for multi-page invoices; but as I recall, if I viewed the invoice on a Mac, and printed it directly, the page could break anywhere in the middle of a line of the invoice.  If I saved it as html, I could then bring it up in either Firefox or Safari.  (I never tried Explorer or Chrome).

In one of Firefox or Safari, the page break was handled correctly.  In the other it was not.   I think it was Firefox that was right, as Safari uses the native rendering on the Mac, as does GnuCash.

Needing to export, and them bring it into a browser is a less-than-desireable workaround, and I had been planning to work on this harder, but the motivation went away, as we never have multi-page invoices these days.   But it does work.

On May 2, 2015, at 11:13 AM, D. Hugh Redelmeier <hugh at> wrote:

> | From: Geert Janssens <geert.gnucash at>
> | On Tuesday 28 April 2015 02:19:19 D. Hugh Redelmeier wrote:
> | > When we print a report on our laser printer, very often the last line
> | > of a page is split and appears partially on the next page.
> | The print issue is a bug in the software (reported here [1]). To be more precise it is a bug in 
> | webkit, which is an external code library gnucash depends on. So far we haven't managed 
> | to work around this unfortunately.
> | [1]
> Thanks for the explanation.
> This would seem to be a pretty serious bug.  We may not be able to
> adopt gnucash because of it.
> The bugzilla entry has a posting saying:
>    nohamnospam 2015-01-02 23:57:26 UTC
> 	To anyone it may concern: My workaround is 
> 	1. html-export from gnucash
> 	2. wkhtmltopdf -B 10 -L 20 -R 20 -T 10 in.html out.pdf
> 	So far no splitsies.
> Has this been widely tested?  If it works reliably, it is intriguing
> since wkhtmltopdf uses Webkit too.  If wkhtmltopdf can avoid line splits
> with webkit then there is likely a way for GnuCash to avoid line
> splits.
> I don't understand the problem well enough to understand why this is
> related to the page-break-* CSS attributes.  I would have thought that
> lines of text would be atomic (either before or after a page break,
> not split by one) without any directives.  But I don't know much
> about HTML.
> If this is really a bug in webkit, I guess that the forking by google
> will take some pressure off fixing this.  It there ever had been
> pressure.
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

More information about the gnucash-user mailing list