SetFont('times', '', 10);
// set document information
$pdf->setRTL(1);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor($Title1);
$pdf->SetTitle($Title2);
$pdf->SetSubject($Title3);
$pdf->SetKeywords($Title4);
$pdf->setHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, $Title1,$Title2);
// set header and footer fonts
$pdf->setHeaderFont(Array('times', '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array('times', '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont('times');
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// add a page
$pdf->AddPage();
// output the HTML content
$pdf->writeHTML($html, true, false, true, false, '');
// reset pointer to the last page
$pdf->lastPage();
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output(uniqid().'.pdf', 'I');
die();
?>
" />