Printing headers and footers on each page is a very difficult task if you use div tags. In my project, I looked for an almost complete web and found that to print headers and footers on each page you should use tables and CSS rules, without using a table and css you cannot print headers on every page. I provide you the code for this:
<style>
@media screen{thead{display:none;}}
@media print{thead{display:table-header-group; margin-bottom:2px;}}
@page{margin-top:1cm;margin-left:1cm;margin-right:1cm;margin-bottom:1.5cm;}}
</style>
CSS , thead , , thead table-header-group, , , - , html- :
<table>
<thead>
<tr>
<th> <--- Your header text would be placed here ---> </th>
</tr>
</thead>
<tbody>
<tr>
<td>
<--- Your printing text would be place here --->
</td>
</tr>
</tbody>
</table>
, IE, Safari, Firefox Chrome , Chrome 1- . , Chrome .