<?php $letter_format="<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<title>Bank Letter of $Student_Name</title>
<link href='Letter_Styles.css' rel='stylesheet' type='text/css' />
</head>
<body>
<p align='left'><b>Date:</b> ". date('F j, Y')." </p>
<p>To<br />
The Manager<br />
......................... Bank<br />
London </p>
<p> </p>
<p><b>Student Name:</b> ".$Student_Name."<br />
<b>Address:</b> ".$row_record_student['house_no'].", ".$row_record_student['street'].", ".$row_record_student['town'].", ".$row_record_student['postcode'].". </p>
<p> </p>
<p><b>Date of birth:</b> ".date('F j, Y',strtotime($row_record_student['date_of_birth']))." <br />
<b>Student number:</b> ".$row_record_student['reg_number']." </p>
<p> </p>
<p>We are delighted to confirm that the above-mentioned student has been enrolled without any condition with the course detailed below.</p>
<table width='90%' border='0' align='left' cellpadding='0' cellspacing='0' >
<tr>
<td width='250'><strong>Course</strong></td>
<td width='627'><b>:</b> ".$course_ttl."</td>
</tr>
<tr>
<td width='250'><strong>Course Mode</strong></td>
<td width='627'><b>:</b>".$studymode."</td>
</tr>
<tr>
<td width='250'><strong>Commencement date</strong></td>
<td width='627'><b>:</b> ".$course_start_date."</td>
</tr>
<tr>
<td width='250'><strong>Expected completion date</strong></td>
<td width='627'><b>:</b> ".$course_end_date."</td>
</tr>
<tr>
<td width='250'><strong>Awarding Body</strong></td>
<td width='627'><b>:</b> ".$awardingbody."</td>
</tr>
<tr>
<td width='173'><strong>Tuition fees</strong></td>
<td width='627'><b>:</b> £".$Total_Fees."</td>
</tr>
<tr>
<td width='173'><strong>Fees Paid</strong></td>
<td width='627'><b>:</b> £".$Fees_paid."</td>
</tr>
<tr>
<td width='173'><strong>Balance Fees</strong></td>
<td width='627'><b>:</b> £".$Due_Amount."</td>
</tr>
</table>
<p><br/>
<br/>
<br/><br/>
<br/>
<br/>
</p>
<p> <br/>
<br/>
<br/>
<br/>
</p>
<p><strong style='text-decoration:underline;'>Overseas Address:</strong><br /><br />".$row_record_student['overseas_address']."</p>
<p>Please do not hesitate to contact the admissions office in case of further queries.</p>
<p><strong>Yours sincerely</strong></p>
<p> </p>
<p><strong>Admissions Officer</strong></p>
</body>
</html>";
?>
I want to convert $letter_format into pdf format. I have used html2pdfclass for convrting and if i convert it into pdf i need to convert $letter_format into html first.how can i do it?