structure = $structure; $this->fontName = $fontName; $this->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM); $this->SetMargins(10, 35, 10); // generic PDF information $this->setTitle($this->structure->getTitle()); $this->setCreator("LDAP Account Manager"); $this->setAuthor("LDAP Account Manager"); // footer $this->setPrintFooter(true); } /** * {@inheritDoc} * @see TCPDF::Header() */ public function Header() { $logoFile = $this->structure->getLogo(); if (!empty($logoFile) && ($logoFile !== 'none')) { $logo = dirname(__FILE__) . "/../config/pdf/" . $_SESSION['config']->getName() . "/logos/" . $logoFile; $this->Image($logo, 10, 10, '', 15, 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false); } else { $this->SetY(10); } $this->SetFont($this->fontName, '', 20); $this->Cell(0, 15, $this->structure->getTitle(), 0, true, 'R', 0, '', 0, false, 'M', 'M'); //set folding marks if ($this->structure->getFoldingMarks() == PDFStructure::FOLDING_STANDARD) { $this->SetLineWidth(0.2); $foldingMarks = array(97, 202); foreach ($foldingMarks as $mark) { $this->Line(0, $mark, 5, $mark); } } } /** * {@inheritDoc} * @see TCPDF::Footer() */ public function Footer() { $this->SetY(-15); $this->SetFont($this->fontName, '', LAMPDF_FONT_SIZE); $footerText = _("This document was automatically created by LDAP Account Manager") . ' (' . getFormattedTime('Y-m-d H:i:s T') . ')'; $this->Cell(0, 10, $footerText, 0, false, 'C', 0, '', 0, false, 'T', 'M'); } }