You are here

function views_pdf_handler_page_break::render in Views PDF 6

Same name and namespace in other branches
  1. 7.3 field_plugins/views_pdf_handler_page_break.inc \views_pdf_handler_page_break::render()
  2. 7 field_plugins/views_pdf_handler_page_break.inc \views_pdf_handler_page_break::render()
  3. 7.2 handlers/views_pdf_handler_page_break.inc \views_pdf_handler_page_break::render()

This method renders the page break. It uses the PDF class to add a page break.

File

field_plugins/views_pdf_handler_page_break.inc, line 59
The page break plugin for PDF page display.

Class

views_pdf_handler_page_break
Plugin class that holds the functionality for the page break in a PDF display.

Code

function render($values) {
  if (isset($this->view->pdf) && is_object($this->view->pdf)) {
    if ($this->options['last_row'] == TRUE && $this->countRecords + 1 >= $this->view->numberOfRecords) {
      return '';
    }
    $this->countRecords++;
    $this->view->pdf
      ->addPage();
    return '';
  }
}