Need help with HTML to PDF with footer

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tengkie
Forum Newbie
Posts: 6
Joined: Sat Apr 18, 2009 11:17 am

Need help with HTML to PDF with footer

Post by tengkie »

I'm being able to print a HTML page to either PDF or MS Word. For the page footer, i'm using a CSS that set the page footer at the bottom of the page. It only works for 1 page only.
If i'm printing more than 1 pages, the footer will overlapped with data from first page.

How do i managed to set the page footer only printed at the bottom of the last page?

Here is my code:

Code: Select all

 
<style type="text/css">
.footer  
{
     position: absolute;
     bottom: 0px;
     left: 0px;
     width: 100%;
}
</style>
<div class="body">
   some page content.....
   ...........
   ..........
   .........
   some page content....
</div>
<div class="footer">
     some footer notes......
</div>
 
with those codes, the page footer will only shown at the first page and it will overlapped with body content.
 
Any idea how to make my footer only printed at the bottom of the last pages (if my document contains more than one pages)?
 
 
Thanks for your kind help.
 
Post Reply