i need to print this as a report, how do i export it to word or pdf with seeing exactly what is seen on the browser? because sometimes the format is disorganized. please help! thanks!

<?php  
session_start();
    if(!session_is_registered(myusername)){
        header("Location:main_login.php");
     }


$userId = $_SESSION['userId'];

include "../../../_functions.php";

?>

<html>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=Windows-1252\">  
<style type="text/css">
<!--
.tableHead {    font-family: "Myriad Pro Light", "Myriad Pro";
    font-size: 17px;
    font-style: normal;
    font-weight: bold;
    color: #FFF;
}
.tableContent {
    font-family:Euphemia;
    font-size: 13px;
    font-style: normal;
    color: #000;
}
-->
</style>
<head>
<title>Untitled Document</title>
</head>

<body>
<?php
$dateNow = date("F d, Y"); 
$reportName = $_GET['title'];
$year = $_GET['year'];
$title = $_GET['title'];
$month = $_GET['month'];

?>
<form method="post">
<table width="89%" border="0" align="center">
<tr><td colspan="4">&nbsp;</td></tr>
<tr><td width="8%" rowspan="3"><img src="../../../_images/logo.png" width="71" height="77"></td>
  <td width="49%" rowspan="3">BANK OF MAKATI</br>
  #44 Sen. Gil Puyat Ave.,</br>
  Brgy. San Isidro, Makati City	</br>
  Tel: 729-5886 </td>
  <td width="7%" rowspan="3">&nbsp;</td>
  <td width="36%">&nbsp;</td>
  </tr>
<tr>
  <td>Date Generated: 
    <?php echo $dateNow;?></td>
</tr>
<tr>
  <td height="21">&nbsp;</td>
</tr>
<tr><td colspan="4">&nbsp;</td></tr>
<tr>
  <td colspan="4" align="center"><strong><?php echo $title." REPORT";?></strong></td>
</tr>
<tr>
<?php
if($month=="00")
{ echo "<td colspan=4 align=center>From ".$from." to ".$to."</td>";
}else
{ 
	switch($month)
	{
		case'01': $monthName = "January"; break;
		case'02': $monthName = "February"; break;	
		case'03': $monthName = "March"; break;	
		case'04': $monthName = "April"; break;	
		case'05': $monthName = "May"; break;	
		case'06': $monthName = "June"; break;	
		case'07': $monthName = "July"; break;	
		case'08': $monthName = "August"; break;	
		case'09': $monthName = "September"; break;
		case'10': $monthName = "October"; break;	
		case'11': $monthName = "November"; break;	
		case'12': $monthName = "December"; break;
	}
  	echo "<td colspan=4 align=center>For the Month of  ".$monthName." on Year ".$year.	"</td>";}
?>
</tr>
<tr>
  <td colspan="4">&nbsp;</td>
</tr>
<tr>
  <td height="25" colspan="4" align="center"><table border="1" cellspacing="0" cellpadding="0">
    <tr>
      <td width="121" align="center">Date Reported</td>
      <td width="95" align="center">Ticket#</td>
      <td width="151" align="center">ControlNum</td>
      <td width="207" align="center">Assigned To</td>
      <td width="119" align="center">Status</td>
      <td width="130" align="center">Last Updated</td>
      </tr>
      <?php
        $catch=mysql_query("SELECT *
						   FROM trouble_ticket
						   WHERE _ticketStatus != 'Closed'
						   AND month(_dateReported) = '$month' AND year(_dateReported) = '$year'") or die('Error:'.query1.mysql_error());  
        while($array = mysql_fetch_array($catch))
        {   
			$assetId = $array['_asset_id'];
			$ticketNum = $array['_ticketNum'];
			$dateNow = date("Y-m-d");
			$status = $array['_ticketStatus'];
			$dateReported = $array['_dateReported'];
			$lastUpdated = $array['_dateUpdated'];
			$technicianId = $array['_technicianuser_accounts_id'];
			
			$catch1 = getAsset_Details($assetId);
            $array1 = mysql_fetch_array($catch1);
			$controlNum = $array1['_controlNum'];
			
			$catch2 = getUser_Details2($technicianId);
            $array2 = mysql_fetch_array($catch2);
			$techName = $array2['_firstName']." ".$array2['_lastName'];
			
			
			echo "<tr align='center'><td class='tableContent'>".$dateReported."</td>";
            echo "<td class='tableContent'>".$ticketNum."</td>";  
            echo "<td class='tableContent'>".$controlNum."</td>";
			if(!strcmp($status,"New"))
				echo "<td class='tableContent'>Unassigned</td>";
			else
				echo "<td class='tableContent'>".$techName."</td>";
            echo "<td class='tableContent'>".$status."</td>";
			if(!strcmp($lastUpdated,NULL))
				echo "<td class='tableContent'>Not yet updated</td>";
			else
				echo "<td class='tableContent'>".$lastUpdated."</td>";
			$count++;
			
			echo "<input type=hidden name=title readonly style=border:hidden value=$title>";
			echo "<input type=hidden name=month readonly style=border:hidden value=$month>";
			echo "<input type=hidden name=year readonly style=border:hidden value=$year>";
        }
    ?>
	<tr>
      <td width="119" colspan="5" align="right">Total Pending Tickets: &nbsp;</td>
      <td width="130" align="center"><?php echo $count;?></td>
      </tr>
  </table></td>
</tr>
</table>
</form>
</body>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.