<?php
require("phpToPDF.php"); 

$my_html = "<table border='1'>";
$my_html.= "<thead>";
$my_html.= "<tr>";
$my_html.= "<th>No</th>";
$my_html.= "<th>Kode</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "<th>Nama</th>";
$my_html.= "</tr>";
$my_html.= "</thead>";
$my_html.= "<tbody>";
for($i = 1; $i <= 400; $i++){
	$my_html.= "<tr>";
	$my_html.= "<td>$i</td>";
	$my_html.= "<td>001</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "<td>Apank</td>";
	$my_html.= "</tr>";
}
$my_html.= "</tbody>";
$my_html.= "</table>";



$my_html_header="SCANDINAVIAN TOBACCO";


$my_html_footer="
<div style=\"display:block;\">
  <div style=\"float:left; width:33%; text-align:left;\">
          ".date("d M Y H:i")."
  </div>
  <div style=\"float:left; width:33%; text-align:center;\">
          &nbsp;
  </div>
  <div style=\"float:left; width:33%; text-align:right;\">
         Page phptopdf_on_page_number of phptopdf_pages_total
   </div>
   <br style=\"clear:left;\"/>
</div>";




$pdf_options = array(
  "source_type" => 'html',
  "source" => $my_html,
  "action" => 'view',
  "page_size" => 'A4',
  "page_orientation" => 'portrait',
  "save_directory" => '',
  "file_name" => 'sample_pdf_report.pdf',
  "header" => $my_html_header,
  "footer" => $my_html_footer);


phptopdf($pdf_options);

?>