background = $fileRef->file->getPath(); } else { $this->background = $GLOBALS['STUDIP_BASE_PATH'] . '/public/assets/images/pdf/pdf_default_background.jpg'; } $this->setDefaults(); } public function Header() { $bMargin = $this->getBreakMargin(); $auto_page_break = $this->AutoPageBreak; $this->SetAutoPageBreak(false, 0); $this->Image($this->background, 0, 0, 210, 297, '', '', '', false, 300, '', false, false, 0); $this->setFont('helvetica', 'B', 50); $this->Cell(0, 160, 'Z E R T I F I K A T', 0, false, 'C', 0, '', 0, false, 'T', 'M'); $this->SetAutoPageBreak($auto_page_break, $bMargin); $this->setPageMark(); } private function setDefaults() { $this->SetTopMargin(110); $this->SetLeftMargin(20); $this->SetRightMargin(20); } }