Пример #1
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');
 }
Пример #2
0
 /**
  * Creates a single cell using NO automatic wrapping at the end of the cell.
  * In most cases, addMultiCell is the element you may want to use instead.
  *
  *
  * @param string $strContent
  * @param int $intWidth
  * @param int $intHeight
  * @param array $bitBorders array of boolean: array(top, right, bottom, left)
  * @param string $strAlign one of self::$TEXT_ALIGN_CENTER, self::$TEXT_ALIGN_RIGHT, self::$TEXT_ALIGN_LEFT
  * @param int $bitFill fill the cell with the color set before via setFillColor()
  *
  * @see class_pdf::addMultiCell()
  * @return void
  */
 public function addCell($strContent = '', $intWidth = 0, $intHeight = 0, $bitBorders = array(false, false, false, false), $strAlign = "L", $bitFill = 0)
 {
     $strBorders = "";
     if ($bitBorders[0]) {
         $strBorders .= "T";
     }
     if ($bitBorders[1]) {
         $strBorders .= "R";
     }
     if ($bitBorders[2]) {
         $strBorders .= "B";
     }
     if ($bitBorders[3]) {
         $strBorders .= "L";
     }
     if ($strBorders == "") {
         $strBorders = 0;
     }
     $this->objPdf->Cell($intWidth, $intHeight, $strContent, $strBorders, 1, $strAlign, $bitFill);
 }