Hi All
I am trying to convert a html form into pdf using php code.
I have a page where is a text like download form as pdf and linked it with a file say "contactform.php"
when user clicks on the link a form in pdf form should should open.
I have wrtitten the code for the same in the contactform.php

here is my code

//
<? session_start(); ?>
<? include("includes/conninc.php"); ?>
<? if(isset($_GET['p'])){$p=$_GET['p'];}else{$p="flatfee";} ?>
<? if($p=="assist"){$contract="seller_program_web.php";}else{$contract="seller_fee_web.php";} ?>

<? require 'PDF.php';
$pdf = &PDF::factory('p', 'a4');
$pdf->open();
$pdf->setCompression(true);
$pdf->addPage();
$pdf->setFont('Courier', '', 8);
$pdf->text(100, 100, 'Resume');
$pdf->setFontSize(10);
$str="
<html>
<body>
<table width="760" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="259"><img src="images/a-1.jpg" width="259" height="93"></td>
<td width="232"><img src="images/a-2.jpg" width="232" height="93"></td>
<td width="288"><img src="images/a-3.jpg" width="269" height="93"></td>
</tr>
<tr>
<td colspan="3" bgcolor=""#FFFFFF"">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor=""#FEBC21"" height="100" valign="top">
include("includes/menu.php")
</td>
<td width="80%" rowspan="2" valign="top">
<table width="97%" height="100%" bgcolor=""#FFFFFF"" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><BR>
<h3 style=""color:#FFBD20"">Commercial Property Form</h3>
<p><img border="0" src="images/required_fields.gif" width="139" height="20" /></p>
<form name="ListingForm" method="POST" action=""<?=$contract?>"" onSubmit="return CheckForm(this);">
<input type="hidden" name="Form_Type" value="Commercial Property Form">
<table id="formTable" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td width="50%" align="right" style=""color: #567890; font-size:13px;"">Full Name:</td>
<td width="50%"><input name="reqFull_Name" type="text" id="Full_Name" value="" maxlength="100" /><img border="0" src="images/required.gif" width="20" height="20" /></td>
</tr>
<tr>
<td align="right" style=""color: #567890; font-size:13px;"">Email:</td>
<td><input name="reqEmail" type="text" id="Email" value="" maxlength="100" /><img border="0" src="images/required.gif" width="20" height="20" /></td>
</tr>
<tr>
<td align="right" style=""color: #567890; font-size:13px;"">Phone:</td>
<td><input name="reqPhone" type="text" id="Phone" value="" maxlength="100" /><img border="0" src="images/required.gif" width="20" height="20" /></td>
</tr>
</table>
</table>";
$pdf->text(100, 200,$str);
$pdf->addPage();
$pdf->setFont('Arial', 'BI', 12);
$pdf->text(100, 100, 'Second page');
$pdf->output('listing_commercial.pdf');

//

but when i click on the link blank page is opening .
Please help me to solve whats wrong in my code.

If any other option to do the same then also please suggest.
Thanks
Seema