/** * This function is call automatically by TCPDF at the end of a page * It takes no parameters * * @access public */ public function Footer() { // prepare the text from the tranlated text $txt = ''; if ($this->_footerParam['form']) { $txt = HTML2PDF_locale::get('pdf05'); } if ($this->_footerParam['date'] && $this->_footerParam['hour']) { $txt .= ($txt ? ' - ' : '') . HTML2PDF_locale::get('pdf03'); } if ($this->_footerParam['date'] && !$this->_footerParam['hour']) { $txt .= ($txt ? ' - ' : '') . HTML2PDF_locale::get('pdf01'); } if (!$this->_footerParam['date'] && $this->_footerParam['hour']) { $txt .= ($txt ? ' - ' : '') . HTML2PDF_locale::get('pdf02'); } if ($this->_footerParam['page']) { $txt .= ($txt ? ' - ' : '') . HTML2PDF_locale::get('pdf04'); } if (strlen($txt) > 0) { // replace some values $toReplace = array('[[date_d]]' => date('d'), '[[date_m]]' => date('m'), '[[date_y]]' => date('Y'), '[[date_h]]' => date('H'), '[[date_i]]' => date('i'), '[[date_s]]' => date('s'), '[[page_cu]]' => $this->getMyNumPage(), '[[page_nb]]' => $this->getMyAliasNbPages()); $txt = str_replace(array_keys($toReplace), array_values($toReplace), $txt); // draw the footer parent::SetY(-11); $this->SetFont('arial', 'I', 8); $this->Cell(0, 10, $txt, 0, 0, 'R'); } }