/** * Sends text to output given the following params. * * @param stdClass $pdf * @param int $x horizontal position * @param int $y vertical position * @param char $align L=left, C=center, R=right * @param string $font any available font in font directory * @param char $style ''=normal, B=bold, I=italic, U=underline * @param int $size font size in points * @param string $text the text to print * @return null */ function cert_printtext($pdf, $x, $y, $align, $font, $style, $size, $text) { $pdf->setFont($font, $style, $size); $pdf->SetXY($x, $y); $pdf->writeHTMLCell(0, 0, '', '', $text, 0, 0, 0, true, $align); }
/** * Sends text to output given the following params. * * @param stdClass $pdf * @param int $x horizontal position * @param int $y vertical position * @param char $align L=left, C=center, R=right * @param string $font any available font in font directory * @param char $style ''=normal, B=bold, I=italic, U=underline * @param int $size font size in points * @param string $text the text to print * @param int $width horizontal dimension of text block */ function certificate_print_text($pdf, $x, $y, $align, $font = 'freeserif', $style, $size = 10, $text, $width = 0) { $pdf->setFont($font, $style, $size); $pdf->SetXY($x, $y); $pdf->writeHTMLCell($width, 0, '', '', $text, 0, 0, 0, true, $align); }