Reputation: 21
I've a situation where I have 2 block-containers - if they are short enough, the should be on one page, separated by a line. But if not, then the 2. block-container has to start on the next page and there should be NO line between them.
How can I do that (because I don't know how I can check if inside a flow is a page-break)? Is there any param I can use to check in FO, if the block starts after a page-break ore something else?
Thanks for any help !!
Frangoo
Upvotes: 2
Views: 2798
Reputation: 1244
You could set the following attribute in the second block container
keep-together.within-page="always"
With this the XSL-FO processor will make sure, that the whole block will remain on the same page. So it would look something like this:
<fo:block keep-together.within-page="always"> <!-- any other attribute as necessary -->
...
</fo:block>
Upvotes: 2