Re: Page breaks and printing?
| From: | BAO RuiXian | Date: | Fri, 17 Oct 2003 22:11:07 +0000 |
| Subject: | Re: Page breaks and printing? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-166561@lists.php.net to get a copy of this message | ||
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>