Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: "Keep Together" (avoid page break) feature #188

Open
batonac opened this issue Mar 7, 2024 · 0 comments
Open

feat: "Keep Together" (avoid page break) feature #188

batonac opened this issue Mar 7, 2024 · 0 comments

Comments

@batonac
Copy link
Contributor

batonac commented Mar 7, 2024

I believe it would be a fairly simple feature and immensely helpful to be able to apply a "keep together" rule to elements to ensure that they are never spread between pages.

Here's an example of the issue I'm referring to:
image

And here's the desired outcome (div is kept to together and pushed to the next page):
image

I believe this should be as simple as applying the css rule page-break-inside: avoid; (for wkhtmltopdf) or break-inside: avoid; (for a more modern renderer) to the object in question. The easiest way to improve our print formats would be to automatically apply this rule to the rectangle elements, but the more sophisticated way would be to add a toggle for a "Keep Together" attribute on individual elements.

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

No branches or pull requests

1 participant