Exemplo n.º 1
0
$pdf->setFooterFont(['freesans', '', PDF_FONT_SIZE_DATA]);
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, "20", PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin("12");
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// ---------------------------------------------------------
// set font
$pdf->SetFont('freesans', '', 8);
// add a page
$pdf->AddPage();
// set cell padding
$pdf->setCellPaddings(1, 1, 1, 1);
// set cell margins
$pdf->setCellMargins(1, 1, 1, 1);
// MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0)
// set some text for student info
$txt1 = get_name(_h($stuInfo[0]['stuID'])) . "<br />";
$txt1 .= _h($stuInfo[0]['address1']) . ' ' . _h($stuInfo[0]['address2']) . "<br />";
$txt1 .= _h($stuInfo[0]['city']) . ' ' . _h($stuInfo[0]['state']) . ' ' . _h($stuInfo[0]['zip']) . "<br />";
// set some text for student info
$txt2 = _t('Student ID: ') . _h($stuInfo[0]['stuID']) . "<br />";
if (_h($stuInfo[0]['ssn']) > 0) {
    $txt2 .= _t('Social Security #: ') . _h($stuInfo[0]['ssn']) . "<br />";
} else {
    $txt2 .= _t('Social Security #: ') . "<br />";
}
if (_h($stuInfo[0]['graduationDate']) > '0000-00-00') {