[webkit-gtk] Alternative to page-break-*
Thiago Bellini Ribeiro
hackedbellini at gmail.com
Wed Aug 22 17:36:21 PDT 2012
On Wed, Aug 22, 2012 at 1:14 PM, Evan Martin <evan at chromium.org> wrote:
> 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
>> example.
>
>
> https://bugs.webkit.org/show_bug.cgi?id=5097
> https://bugs.webkit.org/show_bug.cgi?id=35217
> 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 is
> positioned.
Unfortunately that's not an alternative for us. We are trying to
migrate our reports to html as it's easier to write and maintain..
Cairo maybe have an easier and better api for doing that, but not
sufficient to justify that kind of effort to port an already tested
and working code for something very alike (and that portion of code is
huge!!).
But thanks for the hint! :)
>
>>
>> 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.
I work and study, so, I don't have a lot of spare time..But I'll take
a look at those and, who knows :)..
Also see if someone at my work would like to help too.
Thanks for the feedback!
--
Thiago Bellini | http://hackedbellini.org
“Real knowledge is to know the extent of one's ignorance.” - Confucius
More information about the webkit-gtk
mailing list