I've tried the following suggestions and none have worked, my <fo:block>
keeps getting split between the two inner blocks.
- https://stackoverflow.com/a/8656386/526704
- https://stackoverflow.com/a/2230524/526704
- http://www.antennahouse.com/support/qa/QA/2005061001.html
<fo:block keep-with-next="always" page-break-inside="avoid">
<fo:block keep-together="always">
Block # 1, a header
</fo:block>
<fo:block keep-together="always">
Block # 2, a bunch of text
</fo:block>
</fo:block>
How can I keep the two inner blocks together on the page? I am using FO.NET, in case that has limitations.
I think you should contact FO.NET folks. Testing this example with RenderX XEP and with Apache FOP yields 3 pages output. At 10.36in the whole text of your block fits on the page, at 10.37in it does not. In both products, all of the content in your block is moved to the following page. Note that the only required tag is the page-break-inside="avoid", nothing else.
In looking at the FO.NET website, it has not been updated since 2009. I don;t see anything about their (lack of) support for keeps but coming from another XSL FO vendor, keeps are pretty difficult to do correctly in code.