model && $this->onEveryPage()) { $pdf = $parent->getPDF(); $footerTitleHeight = 8.0; $termsConditionText = $this->model->get(self::$TERMSANDCONDITION_DATA_KEY); $termsConditionHeight = $pdf->GetStringHeight($termsConditionText, $parent->getTotalWidth()); if($termsConditionHeight) $termsConditionHeight += $footerTitleHeight; $descriptionText = $this->model->get(self::$DESCRIPTION_DATA_KEY); $descriptionHeight = $pdf->GetStringHeight($descriptionText, $parent->getTotalWidth()); if($descriptionHeight) $descriptionHeight += $footerTitleHeight; return $termsConditionHeight + $descriptionHeight; } return parent::totalHeight($parent); } function display($parent) { $pdf = $parent->getPDF(); $footerFrame = $parent->getFooterFrame(); if($this->model) { $targetFooterHeight = ($this->onEveryPage())? $footerFrame->h : 0; $descriptionString = $this->labelModel->get(self::$DESCRIPTION_LABEL_KEY); $description = $this->model->get(self::$DESCRIPTION_DATA_KEY); $descriptionHeight = $pdf->GetStringHeight($descriptionString, $footerFrame->w); $pdf->SetFillColor(205,201,201); $pdf->MultiCell($footerFrame->w, $descriptionHeight, $descriptionString, 1, 'L', 1, 1, $footerFrame->x, $footerFrame->y); $pdf->MultiCell($footerFrame->w, $targetFooterHeight - $descriptionHeight, $description, 1, 'L', 0, 1, $footerFrame->x, $footerFrame->y + $descriptionHeight); $termsAndConditionLabelString = $this->labelModel->get(self::$TERMSANDCONDITION_LABEL_KEY); $termsAndCondition = $this->model->get(self::$TERMSANDCONDITION_DATA_KEY); $offsetY = 2.0; $termsAndConditionHeight = $pdf->GetStringHeight($termsAndConditionLabelString, $footerFrame->w); $pdf->SetFillColor(205,201,201); $pdf->MultiCell($footerFrame->w, $termsAndConditionHeight, $termsAndConditionLabelString, 1, 'L', 1, 1, $pdf->GetX(), $pdf->GetY() + $offsetY); $pdf->MultiCell($footerFrame->w, $targetFooterHeight - $termsAndConditionHeight, $termsAndCondition,1, 'L', 0, 1, $pdf->GetX(), $pdf->GetY()); } } } ?>