[webkit-gtk] Alternative to page-break-*
evan at chromium.org
Wed Aug 22 09:14:25 PDT 2012
On Wed, Aug 22, 2012 at 6:06 AM, Thiago Bellini Ribeiro <
hackedbellini at gmail.com> wrote:
> For example. I have a div that can't can printed half on one page and
> half on another. Googling I found that I should use
> 'page-break-inside: avoid' to do that, but neither webkit itself
> (webkitgtk is a fork of it, right?) does that, testing in chromium for
indicates it's not implemented.
To workaround that, I had to define a height for those divs so they
> fit ok on an A4 page without breaking information on half. But that's
> not the best alternative, as any small change, like a font change will
> make me have to recalculate the divs height and etc. And not to say
> that the lack of that advanced print control will difficult to
> implement some tabular information that we haven't tried to start the
> migraion yet.
If I were trying to produce a table output like this, I might try using
cairo directly (which can output to PDF).
It's harder than using HTML but you get exact control over where the text
> The question is..is there any alternative on webkitgtk to work around
> that? Maybe a way of patching webkitgtk inside my app to support one
> of those tags (if it was python, I would be looking for a way of
> monkey-patching it until the bug is solved, but since it's c++ I don't
> know if that's possible)? Or something else?
The WebKit project is pretty open to contribution. You could try to help
get one of the above patches into WebKit so that page-break-inside is
available. You might start with the first bug (which seems to have a
patch) by asking on the IRC channel about how to move forward on it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-gtk