I am currently using PHP and getting complete user details and displays it into a html table. The problem that I have is when I print 3 tables each of them are printed on each page perfectly. But when I try to print over 3 tables, each table moves upwards and the tables are printed partially on each page (1 ½ user details in each page). I have given a fixed height for the table but still displays partially.
Can someone please suggest a Javascript that will print a single html table in one page?
The best way to do this is using CSS. CSS3 has a
page-break-after: alwaysproperty which you can apply to your table (see also http://www.w3schools.com/CSS/pr_print_pageba.asp). Note that its support by the different browsers isn’t yet what it should be, but IE8 and current versions of the others should support it.