File: test.php - Tab length: 1 2 4 8 - Lines: on off - No wrap: on off

<?php

$html = '
<style type="text/css">
table{
font-size:11px; border-collapse:collapse; margin:auto; width:100%; position:relative;
}

#all{
margin:auto;
width:100%;
color: #000000;
font: 11px "Lucida Grande",Geneva,Arial,Verdana,Helvetica,sans-serif;
}

.clearfix {
    display: block;
  height:20px;
}
.percent50 td{
  width:50%;
}
#all h2{
  color: #000000;
  float: right;
  font-size: 16px;
  margin: 0 0 10px;
}
#all h3{
  font-size: 13px;
  padding: 0 0 10px;
}
}
.date{
  color: #000000;
  font: 11px "Lucida Grande",Geneva,Arial,Verdana,Helvetica,sans-serif;
}
.details{
    clear: right;
    float: right;
}
.from,.to{
    font-weight: bold;
    margin-bottom: 10px;
}
.addresses {
    margin-top: 50px;
}
.lines{
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}
.item-kind first{
}
.lines thead th{
    border-bottom: 1px solid #000000;
    color: #686868;
    font-weight: normal;
    padding: 5px 10px;
    text-align: left;
    vertical-align: bottom;
    white-space: nowrap;
}
.lines tbody td {
    border-bottom: 1px solid #CCCCCC;
    padding: 8px 10px;
    vertical-align: top;
}
.lines first{
  color:#FFF;
}
</style>
</head>
<body>
<div id="all">
  <table>
    <tr class="percent50">
      <td><img src="images/logo_.png" alt="logo" /></td>
      <td>
        <h2>Devis N� 4</h2>
        <div class="date details">Date : 17-05-2011</div>
      </td>
    </tr>
    <tr class="clearfix"><td></td></tr>
    <tr class="percent50 addresses">
      <td><div class="to">Emmeteur : </div><div>212 communication</div><div> B12 Gu�liz , Marrakech .</div></td>
      <td><div class="from">Adress� � : </div><div>ELQANDILI Yassine</div> 21 QU EL IKHLASS ESSAOUIRA</td>
    </tr>
    <tr class="clearfix"><td></td></tr>
    <tr class="clearfix"><td></td></tr>
    <tr><td><h3 class="left">Dails du devis </h3></td></tr>
    <tr class="clearfix"><td></td></tr>
  </table>
  <table class="lines">
    <thead>
      <tr>
        <th class="item-kind first"></th>
        <th class="item-description">Description</th>
        <th class="item-qty">Qte</th>
        <th class="item-tax">TVA</th>
        <th class="item-price">Prix Unit. HT</th>
        <th class="item-total last">Total HT</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="item-kind first"></td>
        <td class="item-description">Logo</td>
        <td class="item-qty">1</td>
        <td class="item-tax">0</td>
        <td class="item-price">100.00</td>
        <td class="item-total last">100.00</td>
      </tr>
      <tr>
        <td class="item-kind first"></td>
        <td class="item-description">Banni�re</td>
        <td class="item-qty">1</td>
        <td class="item-tax">0</td>
        <td class="item-price">100.00</td>
        <td class="item-total last">100.00</td>
      </tr>    
      <tr>
        <td class="item-kind first"></td>
        <td class="item-description">Logo</td>
        <td class="item-qty">1</td>
        <td class="item-tax">0</td>
        <td class="item-price">100.00</td>
        <td class="item-total last">100.00</td>
      </tr>    
      <tr>
        <td class="item-kind first"></td>
        <td class="item-description">Logo</td>
        <td class="item-qty">1</td>
        <td class="item-tax">0</td>
        <td class="item-price">100.00</td>
        <td class="item-total last">100.00</td>
      </tr>
    </tbody>
  </table>
</div>'
;
echo $html;
require_once('/html2pdf/html2pdf.class.php');
$html2pdf = new HTML2PDF('P','A4','fr', false, 'ISO-8859-15', array(20, 20, 20, 20));
$html2pdf->WriteHTML($html);
ob_end_clean();
$html2pdf->Output('aaas.pdf');
?>