tags:

views:

31

answers:

1

I'm generating a PDF from HTML using Pisa. The pisa documentation (section 11.3) says that it is possible to repeat a row "It is possible to repeat table rows if a page break occurs within a table. The number of repeated rows is passed in the attribute repeat." Their example code is:

<table repeat="1">>
  <tr><th>Column 1</th><th>...</th></tr>
  ...
</table>

My code is

<table repeat="1" width="100%">
<tr>
   <th align='left'>name</th>
   <th align='right'>text</th>
</tr>
<tr><td colspan=2>
   <table>
     <tr><td>stuff</td></tr>
   </table>
</td></tr>
...
</table>

Any ideas as to why the first <tr> isn't being repeated on page break?

A: 

The solution is to not nest your tables. For some reason Pisa does not repeat the header if the cells are nested tables. Rework your structure to exclude nested tables and it should work.

thejew