[eluser]nandish[/eluser]
Hi guys i had got a problem while generating pdf document using dompdf in code igniter.
I can able to generate pdf doucment and bla,bla.but the probelm is when i open pdf document its not displaying properly.means if the the result contain 40 rows its only display 30 rows and another 10 rows will display on top of the pdf doument like a garabage text.
this is my view file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>pdfformat</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<style type="text/css">
body {
background-color:white;
font-family:arial;
color:black;
}
td{
padding-left:2px;
padding-right:1px;
}
</style>
</head>
<body>
<form>
<table border='1' cellspacing='0' cellpadding='0' width='580' align='center'>
<tr><td colspan='8' align='center'><h2>Roster Details</h2></td></tr>
<?php
if(count($res)>0){
?>
<tr id="col">
<td align ='center'>Jersey Num</td>
<td align = 'center'>Name</td>
<td align = 'center'>Offensive</td>
<td align = 'center'>Defensive</td>
<td align = 'center'>Grade</td>
<td align = 'center'>Height</th>
<td align = 'center'>Weight</td>
<td align = 'center'>Ltr</td>
</tr>
<?php
foreach ($res as $item){
echo "<tr>";
echo "<td align = 'left' style='padding-left:4px;'>".$item['i_number']."</td>";
echo "<td align = 'left' style='padding-left:5px;' >".$item['s_first_name']." " .$item['s_last_name']."</td>";
echo "<td align = 'center' >";
if($item['s_off_pos'] == "")
echo "-";
else
echo $item['s_off_pos'];
echo "</td>";
echo "<td align = 'center' >";
if($item['s_def_pos'] == "")
echo "-";
else
echo $item['s_def_pos'];
echo "</td>";
echo "<td align = 'center' >";
if($item['s_grade'] == "")
echo "-";
else
echo $item['s_grade'];
echo "</td>";
echo "<td align = 'center' >";
if( $item['s_height'] == "")
echo "-";
else
echo $item['s_height'];
echo "</td>";
echo "<td align = 'center' >";
if($item['s_weight'] == "")
echo "-";
else
echo $item['s_weight'];
echo "</td>";
echo "<td align = 'center' >".$item['i_ltr']."</td>";
echo "</tr>";
}
}
?>
</table>
</form>
</body>
</html>