Welcome Guest, Not a member yet? Register   Sign In
page break not working
#1

I want to download a html as pdf file using mpdf . for each page contains 25 page accordingly.
also header and footer on all pages.how to set?
Code:
$query1 = mysql_query("SELECT * from sitting_details ");
$staff = mysql_fetch_array($query1);
$coun = count($query_omr);

<tr>
<td>
<strong><caption> Details</caption> </strong>

<table id="dynamic-table" class="table table-striped table-bordered table-hover"  border="1" style="page-break-inside: avoid">


<tr bgcolor="#CCCCCC" >
<th align="center" width="50px"><label class="control-label bolder blue">Sl.No </label></th>
<th align="center" width="100px"><label class="control-label bolder blue">Staff ID </label></th>
<th align="left" width="100px"><label class="control-label bolder blue">&nbsp;Staff Name</label></th>
<th align="left" width="100px"><label class="control-label bolder blue">&nbsp;Designation </label></th>



</tr>';
$c1=0;
while($row_dummy = mysql_fetch_array($query_omr)) {
$c1++;

$text_page=$text_page.'
<tr>
<td align="center"><h3>'. $c1 .'</h3></td>
<td align="center"><h3>'. $row_dummy['staff_code'].'</h3></td>
<td align="left"><h3>'. $row_dummy['staff_name'].'</h3></td>
<td align="left"><h3>'. $row_dummy['staff_designation'].'</h3></td>

</tr>';


$mpdf->AddPage();
Reply




Theme © iAndrew 2016 - Forum software by © MyBB