Include a stylesheet with your custom style for footer for print using media="print"
as
<link rel="stylesheet" href="yourpath/footerstyle.css" media="print"/>
or
embed styles as in html
<style>
@media print {
footer {
display: block;
width:100%;
position:absolute;
left:0;
bottom:0;
}
}
</style>
or
<style type="text/css" media="print">
footer {
display: block;
width:100%;
position:absolute;
left:0;
bottom:0;
}
</style>
Try to position the body relative and the footer absolute:
<style type="text/css" media="print">
body {
position: relative;
}
footer {
display: block;
width:100%;
position:absolute;
left:0;
bottom:0;
}
</style>
or you could use something like this:
@page:last {
@bottom-center {
content: "…";
}
}
CSS 3 Paged Media module
Edit
<style type="text/css" media="print">
body {
position: relative;
margin: 0;
}
.page-section {
/* Specify physical size of page, margins may vary by browser */
height: 10 in; /* or give size as per proper calculation of the height of all your pages after which you want footer */
position: relative;
}
footer {
display: block;
width:100%;
position:absolute;
left:0;
bottom:0;
}
</style>
add .page-section
to relevant div / divs as per you want divs to print per page or directly add to body
tag.