xheadertext = 'YOUR ORGANIZATION'; * set the fill color in the view using * $fpdf->xheadercolor = array(0,0,100); (r, g, b) * set the font in the view using * $fpdf->setHeaderFont(array('YourFont','',fontsize)); */ function Header() { list($r, $b, $g) = $this->xheadercolor; //$this->setY(10); // shouldn't be needed due to page margin, but helas, otherwise it's at the page top //$this->Image(K_PATH_IMAGES.'cmcheader.jpg'); $this->SetFillColor(255, 255, 255); $this->SetTextColor(0 , 0, 152); $this->Cell(0,0, $this->xheadertext, 0,1,'C', 1); //$this->Text(15,26,$this->xheadertext ); } /** * Overwrites the default footer * set the text in the view using * $fpdf->xfootertext = 'Copyright © %d YOUR ORGANIZATION. All rights reserved.'; */ function Footer() { $year = date('Y'); $footertext = sprintf($this->xfootertext, $year); $this->SetY(-20); $this->SetTextColor(0, 0, 0); $this->SetFont($this->xfooterfont,'',$this->xfooterfontsize); $this->Cell(0,8, $footertext,'T',1,'C'); } } ?>