Don't know the HTML thead/tbody/tfoot elements can hold down on a single page. The CSS command page-break-before:always and page-break-after:always should play the trick on a XML sensible browser like IE or Opera. For example, you can have a look at this page:

http://www.codeave.com/css/code.asp?u_log=4016

Best

Bao

Leif K-Brooks wrote:
J J wrote:

Is there a good way in PHP to determine page breaks
for long reports and printing? I'd like to be able to
best determine where pages should begin and end and
reprint things like table/page headers and footers on
each page so the reports print nicely.


Just use HTML thead/tfoot elements and let the browser do it for you:

<table>
<thead>
<tr>
<th>Something</th>
<th>Something</th>
<th>Something</th>
<tr>
</thead>
<tbody>
<tr>
<td>Data</td>
<td>Data</td>
<td>Data</td>
</tr>
<tr>
<td>Data</td>
<td>Data</td>
<td>Data</td>
</tr>
<tr>
<td>Data</td>
<td>Data</td>
<td>Data</td>
</tr>
<tr>
<td>Data</td>
<td>Data</td>
<td>Data</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="3">Footer</td>
</tr>
</tfoot>
</table>


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to