You are here

public function PdfTemplate::setViewsFooter in Views PDF 7

Same name and namespace in other branches
  1. 7.2 views_pdf_template.php \PdfTemplate::setViewsFooter()

File

./views_pdf_template.php, line 201
PDF Class to generate PDFs with native PHP. This class based on FPDF and FPDI.

Class

PdfTemplate
The main class to generate the PDF.

Code

public function setViewsFooter($footer, $options) {
  $this->views_footer = $footer;
  if (!empty($this->views_footer)) {
    if (isset($options['position'])) {
      $this->lMargin = $options['position']['x'];
    }
    $page = $this
      ->getPage();
    if ($page == 0) {
      $this
        ->addPage();
      $page = $this
        ->getPage();
    }
    $this
      ->setPage($page);
    $this
      ->writeHTML($this->views_footer, true, false, true, true);
  }
}