Forum How do I...?

Conditional page break to stop large amounts of whitespace

sundiveo
Hi,

I currently have some dynamic content then a page break and then some more content. Occasionally the first bit of content runs just over one page which causes a lot of whitespace because it has a "page-break-after: always" property.

Is there a way to conditionally apply the "page-break-after: always" property depending on how much page real estate the content takes up?

Thanks!
mikeday
No, I don't think this is possible at the moment. You might be able to get a similar effect by specifying a height for the block on the first page that is about the same as the height of the page itself. This will push the next block on to the second page if the first block is short, but will not push it on to the third page. Might be a bit fiddly, though.