Welcome Guest, Not a member yet? Register   Sign In
DOMpdf Documentation with Code Igniter
#3

[eluser]kevinprince[/eluser]
Here is my code for the view, ive tried the page break css a few ways this way it just makes a few blank sheets.

Help appreciated!

Code:
<html>
<style type="text/css">

body {
    margin: 0.5in;
}
h1, h2, h3, h4, h5, h6, li, blockquote, p, th, td {
    font-family: Helvetica, Arial, Verdana, sans-serif; /*Trebuchet MS,*/
}
h1, h2, h3, h4 {
    color: #5E88B6;
    font-weight: normal;
}
h4, h5, h6 {
    color: #5E88B6;
}
h2 {
    margin: 0 auto auto auto;
    font-size: x-large;
}
li, blockquote, p, th, td {
    font-size: 80%;
}
ul {
    list-style: url(/img/bullet.gif) none;
}
table {
    width:95%;
    border-top:1px solid #e5eff8;
    border-right:1px solid #e5eff8;
    margin: 0 auto;
    border-collapse:collapse;
    font-size: 14px;
    }
tr.odd td    {
    background:#f7fbff
    }
tr.odd .column1    {
    background:#f4f9fe;
    }    
.column1    {
    background:#D8DFEA;
    }
td {
    color:#444;
    border-bottom:1px solid #e5eff8;
    border-left:1px solid #e5eff8;
    padding: 2px;
    text-align:left;
    }                
th {
    font-weight:normal;
    color: #3B5998;
    text-align:left;
    border-bottom: 1px solid #e5eff8;
    border-left:1px solid #e5eff8;
    padding: 2px 2px 2px 5px;
    }                            
thead th {
    background:#D8DFEA;
    text-align:left;
    font:bold 11px "Century Gothic","Trebuchet MS",Arial,Helvetica,sans-serif;
    color:#3B5998;
    }    
tfoot th {
    text-align:center;
    background:#f4f9fe;
    }    
tfoot th strong {
    font:bold 01px "Century Gothic","Trebuchet MS",Arial,Helvetica,sans-serif;
    margin: 0;
    color:#66a3d3;
        }        
tfoot th em {
    color:#f03b58;
    font-weight: bold;
    font-size: 10px;
    font-style: normal;
    }    

#footer {
    border-top: 1px solid #CCC;
    text-align: right;
}

P.breakhere {page-break-after: always}
</style>
<body>
    <h3>Call List : &lt;?=$title;?&gt;</h3>
    <table width="100%" cellpadding="0" cellspacing="0" bordercolor="000" style="font:Arial, Helvetica, sans-serif">
   <tr>
    <td width="50%" bgcolor="#CCCCCC"><b>Name</b></td>
    <td width="50%" bgcolor="#CCCCCC"><b>Number</b></td>
   </tr>
   &lt;?php $i = 0; foreach($contacts as $item) { $i++?&gt;
  <tr>
    <td>[&lt;?php echo $i; ?&gt;] - &lt;?php echo $item['fname'];?&gt; &lt;?php echo $item['sname'];?&gt;</td>
    <td>&lt;?php echo $item['phone'];?&gt; &lt;? echo $item['mobile'];?&gt;</td>
  </tr>
  &lt;?php if ($i == "20") { echo "<p STYLE='page-break-after: always'></p>"; $i=0; }?&gt;
  &lt;?php };?&gt;
</table>
&lt;/body&gt;
&lt;/html&gt;


Messages In This Thread
DOMpdf Documentation with Code Igniter - by El Forum - 01-14-2008, 07:29 AM
DOMpdf Documentation with Code Igniter - by El Forum - 01-14-2008, 10:13 AM
DOMpdf Documentation with Code Igniter - by El Forum - 01-14-2008, 11:37 AM
DOMpdf Documentation with Code Igniter - by El Forum - 01-15-2008, 03:44 AM
DOMpdf Documentation with Code Igniter - by El Forum - 01-15-2008, 05:59 AM
DOMpdf Documentation with Code Igniter - by El Forum - 01-16-2008, 10:12 PM
DOMpdf Documentation with Code Igniter - by El Forum - 01-17-2008, 02:17 AM
DOMpdf Documentation with Code Igniter - by El Forum - 01-17-2008, 08:15 AM
DOMpdf Documentation with Code Igniter - by El Forum - 01-17-2008, 08:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB