Пример #1
0
 /**
  * Writes the header for a single page.
  * Use the passed $objPdf to access the pdf.
  *
  * @param class_pdf_tcpdf $objPdf
  */
 public function writeHeader($objPdf)
 {
     $objPdf->SetY(3);
     $objPdf->SetFont('helvetica', '', 8);
     // Title
     $objPdf->MultiCell(0, 0, $objPdf->getTitle(), "B", "C");
     // Line break
     $objPdf->Ln(30);
 }
Пример #2
0
 /**
  * Writes the footer for a single page.
  * Use the passed $objPdf to access the pdf.
  *
  * @param class_pdf_tcpdf $objPdf
  * @return void
  */
 public function writeFooter($objPdf)
 {
     // Position at 1.5 cm from bottom
     $objPdf->SetY(-10);
     // Set font
     $objPdf->SetFont('helvetica', 'I', 8);
     // Page number
     $objPdf->Cell(0, 0, $objPdf->getAliasNumPage() . '/' . $objPdf->getAliasNbPages(), 'T', 0, 'R');
     $objPdf->SetY(-10);
     //date
     $objPdf->Cell(0, 0, '' . timeToString(time(), false) . $this->strFooterAddon, '0', 0, 'L');
 }
Пример #3
0
 /**
  * Sets the fon to be used up from the current position.
  *
  * @param string $strFont one of courier, helvetica, symbol, times
  * @param int $intSize
  * @param string $strStyle one of self::$FONT_STYLE_REGULAR, self::$FONT_STYLE_BOLD, self::$FONT_STYLE_ITALIC, self::$FONT_STYLE_UNDERLINE, self::$FONT_STYLE_LINE_TROUGH
  *
  * @return void
  */
 public function setFont($strFont = "helvetica", $intSize = 10, $strStyle = "")
 {
     $this->objPdf->SetFont($strFont, $strStyle, $intSize);
 }