preventing page break before table.

Aug 13, 2010 at 7:21 AM
Edited Aug 13, 2010 at 12:51 PM

Hi there,

I have a <fo:table> which is the first element in the <fo:flow>. The output is fine as long as the table fits on one page, however when it does not, a page break is inserted before the table which leaves a blank page as first page.

I meddled with keep-with-pervious and other properties but nothing is working for me so far.

- did put an <fo:block> </fo:block> before and tried keep-with-previous property to always. not working

- tried to put my table into a blind table and same keep-with-previous property

any ideas?


		<fo:flow flow-name="xsl-region-body">
			<fo:table table-layout="fixed"   height="11.0cm">




Aug 13, 2010 at 1:27 PM

This seems to be a FO.Net issue, nFop does not render this first blank page...

Apr 14, 2011 at 6:25 PM

I had the same issue and looked around on the internet for a fix.

Here is what I came up with and it works for me:

<fo:table-cell xsl:use-attribute-sets="Cell_Font" >

<fo:block xsl:use-attribute-sets="Block_Cell" keep-together.within-page="always" >


<xsl:value-of select="selected data here" />




I added the keep-together.within-page on each block for a table cell, then put the data in an fo:inline statement and it works.  

I took out the keep-together stuff for the table-row as that did not work and caused the first page to have no body, just header and footer.

Try it and see

Jul 31, 2012 at 5:34 PM

For me dont work....any other workarround?