On 08/12/2011 01:03 PM, Joshua Wulf wrote:
Jeff, what about this:

Page Breaking

The current page breaking algorithm of WebKit leaves much to be desired.
Basically webkit will render everything into one long page, and then cut
it up into pages. This means that if you have two columns of text where
one is vertically shifted by half a line. Then webkit will cut a line
into to pieces display the top half on one page. And the bottom half on
another page. It will also break image in two and so on. If you are
using the patched version of QT you can use the CSS page-break-inside
property to remedy this somewhat.

You may note in the sample PDFs that:

1: chapters have page breaks before them

2: admonitions & examples don't break across pages unless they are longer than a page

This is because the test is using a patched QT, installed outside the normal library path, and I modified the CSS file to break those ways to see if it was easy to overcome such issues.

We'd need to add more rules to make images and such avoid breaking, but it's relatively straight forward and something we could get done in a reasonable time.

There is no easy solution to this
problem, until this is solved try organising your HTML documents such
that it contains many lines on which pages can be cut cleanly.

I think technical content lends itself to having many breaking locations, and using this tool we could easily add style rules that writers could set when they need to specify a line break.

e.g. since status gets translated to a class, we could add CSS classes break-before, break-after, etc, to allow writers to force page breaks when the PDF isn't quite right.

While the output isn't perfect I think it lends itself to easier layout manipulation by the writer, which makes it easier to deal with specific issues. Currently we can't customise FOP output this way so if your content doesn't exactly match the layout expectations then you are outta luck.

See also: http://code.google.com/p/wkhtmltopdf/issues/detail?id=9,
http://code.google.com/p/wkhtmltopdf/issues/detail?id=33 and
http://code.google.com/p/wkhtmltopdf/issues/detail?id=57.

Cheers, Jeff.

_______________________________________________
publican-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/publican-list
Wiki: https://fedorahosted.org/publican

Reply via email to