keep-with-next does not work in a nested table, need workaround

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

keep-with-next does not work in a nested table, need workaround

Erik van Barneveld
Hi all,

I am using fop version 0.20.5 on Windows-XP. I am creating PDF output.

My problem:

There is a table cell that contains a table that overflows a page. The overflowed part is rendered on the second page and has exactly the height of the padding-top (=3pt) but has no content.
I want to avoid that a small (and empty) part of the table gets rendered the next page. When two or more rows would be in that part, it would be fine.

Solution?

One might think that the solution is to use table-rows and put a 'keep-with-next' property on the last 2..3 rows.
But this does not work when the table-rows are in a table that is in a table cell of another table.

Is there a solution for this problem?

Erik.


This minimized xsl-fo file produces the undesired output:

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

<fo:layout-master-set>

<fo:simple-page-master page-width="210mm" page-height="297mm" master-name="bugtest"
     margin-right="2cm" margin-left="2cm" margin-bottom="2cm" margin-top="2cm">
<fo:region-body margin-top="1cm" margin-bottom="1cm"/>
</fo:simple-page-master>

</fo:layout-master-set>


<fo:page-sequence master-reference="bugtest">

<fo:flow flow-name="xsl-region-body">

<fo:block>

<fo:table table-layout="fixed" width="100%">
<fo:table-column/>
<fo:table-body>

<fo:table-row>

<fo:table-cell border="solid" padding-top="3pt">

<fo:block>

<fo:table table-layout="fixed" width="100%">
<fo:table-column/>
<fo:table-body>

<fo:table-row>
<fo:table-cell>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
<fo:block>x</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>

</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]