Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

Support CSS "page-break-before" avoid and always for table rows #36

Open
wants to merge 2 commits into
base: wk_4.8.7
Choose a base branch
from

Conversation

andkorsh
Copy link

@andkorsh andkorsh commented Sep 14, 2017

This was requested multiple times, e.g. wkhtmltopdf/wkhtmltopdf#2997 and wkhtmltopdf/wkhtmltopdf#3395.

This code adds support for 'avoid' and 'always' options of 'page-break-before' property for table rows.

Always is usually used when you just need to break the table at the particular position.

Avoid is used when your table has some sort of row groups which you wouldn't want to be broken to the next page in the middle of. In that case you can set 'auto' for the first row in a group and 'avoid' for all the others - then the page will only be broken between the groups.

PS: An algorithm is just looking for the previous row we can break before. If there is no such row - we're in trouble, meaning that there's nothing we can do to support 'avoid' property.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant