I found many related in google and stackoverflow but it is not effect to my result. My data over 40000 row, i want print auto next page and fix data break row.
and set page number for every page.
<table cellspacing="0" class="table table_print" border="1">
<thead>
<tr>
<th>Num</tr>
<th>Name</th>
<th>Address</th>
<th>Contact</th>
<th>Jan</th>
<th>Feb</th>
<th>Mar</th>
<th>Apr</th>
<th>May</th>
<th>Jun</th>
<th>Jul</th>
<th>Aug</th>
<th>Sep</th>
<th>Oct</th>
<th>Nov</th>
<th>Dec</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="2" scope="rowgroup"><?php echo $i; ?></td>
<td rowspan="2" scope="rowgroup"><?php echo $name; ?></td>
<td rowspan="2" scope="rowgroup"><?php echo $address; ?></td>
<td rowspan="2" scope="rowgroup"><?php echo $contact; ?></td>
<td scope="row"><?php echo $data[$i]['jan_price']; ?></td>
<td scope="row"><?php echo $data[$i]['feb_price']; ?></td>
<td scope="row"><?php echo $data[$i]['mar_price']; ?></td>
<td scope="row"><?php echo $data[$i]['apr_price']; ?></td>
<td scope="row"><?php echo $data[$i]['may_price']; ?></td>
<td scope="row"><?php echo $data[$i]['jun_price']; ?></td>
<td scope="row"><?php echo $data[$i]['jul_price']; ?></td>
<td scope="row"><?php echo $data[$i]['aug_price']; ?></td>
<td scope="row"><?php echo $data[$i]['sep_price']; ?></td>
<td scope="row"><?php echo $data[$i]['oct_price']; ?></td>
<td scope="row"><?php echo $data[$i]['nov_price']; ?></td>
<td scope="row"><?php echo $data[$i]['des_price']; ?></td>
</tr>
<tr>
<td scope="row"><?php echo $data[$i]['jan_grand']; ?></td>
<td scope="row"><?php echo $data[$i]['feb_grand']; ?></td>
<td scope="row"><?php echo $data[$i]['mar_grand']; ?></td>
<td scope="row"><?php echo $data[$i]['apr_grand']; ?></td>
<td scope="row"><?php echo $data[$i]['may_grand']; ?></td>
<td scope="row"><?php echo $data[$i]['jun_grand']; ?></td>
<td scope="row"><?php echo $data[$i]['jul_grand']; ?></td>
<td scope="row"><?php echo $data[$i]['aug_grand']; ?></td>
<td scope="row"><?php echo $data[$i]['sep_grand']; ?></td>
<td scope="row"><?php echo $data[$i]['oct_grand']; ?></td>
<td scope="row"><?php echo $data[$i]['nov_grand']; ?></td>
<td scope="row"><?php echo $data[$i]['des_grand']; ?></td>
</tr>
</tbody>
</table>
I try many with page-break-after: always;
page-break-inside: avoid;
page-break-before: avoid;
but it's not work.