This project is read-only.

prevent table from being spread out over 2 pages

Aug 22, 2012 at 8:32 AM


I have searched the internet and this site for a solution on how to avoid a page break inside a table but everything I find does not seem to work.

In the 0.20.xx version of apache FOP keep-with-next on a table row should be implemented but somehow I can't get it to work reliably.

This is what I have so far:


<fo:table table-layout="fixed" width="100%">
  <fo:table-column column-width="proportional-column-width(1)"/>
    <fo:table-row keep-with-next="always">
          some header
  </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block>
some text spread out over multiple rows
         <fo:block> </fo:block>
using the fo block so act similar to the html <br />
</fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table>

How can I make sure that this table is not broken to span more than one page?

Kind regards,