draw the PDF footer with the HTML in page_footer

@access protected
517252
protected function _setPageFooter()
    {
        if (!count($this->_subFOOTER)) {
            return false;
        }

        if (in_array($this->pdf->getPage(), $this->_hideFooter)) {
            return false;
        }

        $oldParsePos = $this->_parsePos;
        $oldParseCode = $this->parsingHtml->code;

        $this->_parsePos = 0;
        $this->parsingHtml->code = $this->_subFOOTER;
        $this->_isInFooter = true;
        $this->_makeHTMLcode();
        $this->_isInFooter = false;

        $this->_parsePos = $oldParsePos;
        $this->parsingHtml->code = $oldParseCode;
    }
609127
private function cardFooter() : string
    {
        $html = '';

        if ($this->footer !== null) {
            $html .= '<div class="card-footer' . $this->elementAttr('footer') .
                '"' . $this->elementAttr('header') . '>' . $this->footer . '</div>';
        }

        return $html;
    }
1167125
public function renderPagebrowser()
    {
        /** @var \TYPO3\CMS\Fluid\View\StandaloneView $view */
        $view = GeneralUtility::makeInstance(\TYPO3\CMS\Fluid\View\StandaloneView::class);
        $view->setTemplateRootPaths($this->conf['view']['templateRootPaths']);
        $view->setTemplate('Widget/Pagination');
        $pagination = [];

        $numberOfResults = $this->numberOfResults;
        $resultsPerPage = $this->conf['resultsPerPage'];
        $maxPages = $this->conf['maxPagesInPagebrowser'];

        // get total number of items to show
        // show pagebrowser only if there are more entries that are shown on one page
        if ($numberOfResults > $resultsPerPage) {
            $this->limit = $resultsPerPage;
        } else {
            return;
        }

        // set db limit
        $start = ($this->piVars['page'] * $resultsPerPage) - $resultsPerPage;
        $this->dbLimit = $start . ',' . $resultsPerPage;
        $end = ($start + $resultsPerPage > $numberOfResults) ? $numberOfResults : ($start + $resultsPerPage);

        // number of pages
        $pagesTotal = ceil($numberOfResults / $resultsPerPage);

        // calculate start and end page
        $startPage = $this->piVars['page'] - ceil(($maxPages / 2));
        $endPage = $startPage + $maxPages - 1;
        if ($startPage < 1) {
            $startPage = 1;
            $endPage = $startPage + $maxPages - 1;
        }
        if ($startPage > $pagesTotal) {
            $startPage = $pagesTotal - $maxPages + 1;
            $endPage = $pagesTotal;
        }
        if ($endPage > $pagesTotal) {
            $startPage = $pagesTotal - $maxPages + 1;
            $endPage = $pagesTotal;
        }

        // create pages list, previous, current and next for pagination widget
        $pages = [];
        for ($i = 1; $i <= $pagesTotal; $i++) {
            if ($i >= $startPage && $i <= $endPage) {
                $pages[] = $i;
            }
        }
        $pagination['pages'] = $pages;

        if ($this->piVars['page'] > 1) {
            $pagination['previous'] = $this->piVars['page'] - 1;
        }

        if ($this->piVars['page'] < $pagesTotal) {
            $pagination['next'] = $this->piVars['page'] + 1;
        }

        $pagination['currentPage'] = $this->piVars['page'];
        $view->assign('pagination', $pagination);

        // render pagebrowser content and pass it together with some variables to fluid template
        $markerArray = array(
            'current' => $this->piVars['page'],
            'pages_total' => $pagesTotal,
            'pages_list' => $view->render(),
            'start' => $start + 1,
            'end' => $end,
            'total' => $numberOfResults,
            'results' => $this->pi_getLL('results'),
            'until' => $this->pi_getLL('until'),
            'of' => $this->pi_getLL('of'),
        );

        // hook for additional markers in pagebrowser
        if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['pagebrowseAdditionalMarker'])) {
            foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['pagebrowseAdditionalMarker'] as $_classRef) {
                $_procObj = &GeneralUtility::makeInstance($_classRef);
                $_procObj->pagebrowseAdditionalMarker(
                    $markerArray,
                    $this
                );
            }
        }

        $this->fluidTemplateVariables['pagebrowser'] = $markerArray;
    }
1189330
public function render(): void
	{
		$page = $this->paginator->page;
		if ($this->paginator->pageCount < 2) {
			$steps = [$page];
			$viewed = false;
		} else {
			$viewed = true;

			$f = $first = $page - $this->pageAround;
			$l = $last = $page + $this->pageAround;
			if ($f < $this->paginator->firstPage) {
				$last += ($this->paginator->firstPage - $f);
			}
			if ($l > $this->paginator->lastPage) {
				$first -= ($l - $this->paginator->lastPage);
			}
			$arr = range(max($this->paginator->firstPage, $first), min($this->paginator->lastPage, $last));

			if ($this->othersPage > 0) {
				$count = $this->othersPage * 2;
				$quotient = ($this->paginator->pageCount - 1) / $count;
				for ($i = 0; $i <= $count; $i++) {
					$arr[] = round($quotient * $i) + $this->paginator->firstPage;
				}
				sort($arr);
				$steps = array_values(array_unique($arr));
			} else {
				$steps = $arr;
			}
		}

		$this->template->viewed = $viewed;
		$this->template->steps = $steps;
		$this->template->paginator = $this->paginator;
		$this->template->isAjax = $this->isAjax;
		$this->template->noHistory = $this->noHistory;
		$this->template->prev = $this->prev;
		$this->template->next = $this->next;
		$this->template->other = $this->other;
		if (count($this->onClick ?? []) > 0) {
			$this->template->handle = 'click!';
		} else {
			$this->template->handle = 'this';
		}

		$this->template->setFile($this->templateFile);
		$this->template->render();
	}
1227125
public function renderPager()
	{
		if(!$this->enablePagination)
			return;

		$pager=array();
		$class='CLinkPager';
		if(is_string($this->pager))
			$class=$this->pager;
		elseif(is_array($this->pager))
		{
			$pager=$this->pager;
			if(isset($pager['class']))
			{
				$class=$pager['class'];
				unset($pager['class']);
			}
		}
		$pager['pages']=$this->dataProvider->getPagination();

		if($pager['pages']->getPageCount()>1)
		{
			echo '<div class="'.$this->pagerCssClass.'">';
			$this->widget($class,$pager);
			echo '</div>';
		}
		else
			$this->widget($class,$pager);
	}
719359
protected function tt_content_drawFooter(PageLayoutView $parentObject, array $row)
    {
        $content = '';
        // Get processed values:
        $info = [];
        $parentObject->getProcessedValue('tt_content', 'starttime,endtime,fe_group,space_before_class,space_after_class', $row, $info);

        // Content element annotation
        if (!empty($GLOBALS['TCA']['tt_content']['ctrl']['descriptionColumn']) && !empty($row[$GLOBALS['TCA']['tt_content']['ctrl']['descriptionColumn']])) {
            $info[] = htmlspecialchars($row[$GLOBALS['TCA']['tt_content']['ctrl']['descriptionColumn']]);
        }

        // Call drawFooter hooks
        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawFooter'] ?? [] as $className) {
            $hookObject = GeneralUtility::makeInstance($className);
            if (!$hookObject instanceof PageLayoutViewDrawFooterHookInterface) {
                throw new \UnexpectedValueException($className . ' must implement interface ' . PageLayoutViewDrawFooterHookInterface::class, 1404378171);
            }
            $hookObject->preProcess($parentObject, $info, $row);
        }

        // Display info from records fields:
        if (!empty($info)) {
            $content = '<div class="t3-page-ce-info">
				' . implode('<br>', $info) . '
				</div>';
        }
        // Wrap it
        if (!empty($content)) {
            $content = '<div class="t3-page-ce-footer">' . $content . '</div>';
        }
        return $content;
    }
1136273
public function render()
    {
        if ($this->config[ 'ordering' ]) {
            $this->attributes->addAttributeClass('table-ordering');
        }

        // Render header
        $tr = $this->header->createRow();

        foreach ($this->columns as $key => $column) {

            $th = $tr->createColumn('th');

            $column[ 'attr' ][ 'data-column' ] = $key;

            foreach ($column[ 'attr' ] as $name => $value) {
                if ( ! empty($value)) {
                    $th->attributes->addAttribute($name, $value);
                }
            }

            if ($column[ 'sorting' ] === true) {
                $icon = new Ui\Contents\Icon('fa fa-sort');
                $icon->attributes->addAttributeClass(['text-muted', 'float-right', 'mt-1']);

                $th->attributes->addAttributeClass('col-sortable');
                $th->attributes->addAttribute('data-toggle', 'sort');
                $th->childNodes->push($icon);
            }

            if ($column[ 'show' ] === false) {
                $th->attributes->addAttributeClass('hidden');
            }

            $th->textContent->push(language()->getLine($column[ 'label' ]));
        }

        // Render tbody
        if ($this->rows->count() > 0) {
            $totalEntries = $this->rows->count();
            $totalRows = $this->rows->countAll();
            $currentPage = input()->get('page') ? input()->get('page') : 1;
            $startNumber = $currentPage == 1 ? 1 : $currentPage * $this->config[ 'entries' ][ 'minimum' ];
            $totalPages = round($totalRows / $this->config[ 'entries' ][ 'minimum' ]);
            $totalPages = $totalPages == 0 && $totalRows > 0 ? 1 : $totalPages;

            $i = $startNumber;
            foreach ($this->rows as $row) {
                $row->numbering = $i;
                $tr = $this->body->createRow();
                $tr->attributes->addAttribute('data-id', $row->id);

                foreach ($this->columns as $key => $column) {

                    $column[ 'key' ] = $key;
                    $td = $tr->createColumn();

                    $column[ 'attr' ][ 'data-column' ] = $key;

                    foreach ($column[ 'attr' ] as $name => $value) {
                        if ( ! empty($value)) {
                            $td->attributes->addAttribute($name, $value);
                        }
                    }

                    if ($column[ 'show' ] === false) {
                        $td->attributes->addAttributeClass('hidden');
                    }

                    $td->attributes->addAttributeClass('col-body-' . $key);

                    $this->renderBodyColumn($td, $column, $row);
                }

                $i++;
            }
        } else {
            $totalEntries = 0;
            $totalRows = 0;
            $currentPage = 1;
            $startNumber = 0;
            $totalPages = 0;
        }

        $showEntries = input()->get('entries') ? input()->get('entries') : $this->config[ 'entries' ][ 'minimum' ];

        // Build table card
        $card = new Ui\Components\Card();
        $card->attributes->addAttribute('data-role', 'table-crud');
        $card->attributes->addAttributeClass('card-table');

        // Build table header tools
        $tools = new Element('div', 'cardHeaderTools');
        $tools->attributes->addAttributeClass(['card-tools', 'float-left']);

        $buttons = new Ui\Components\Buttons\Group();
        foreach ($this->tools as $key => $tool) {
            if ($tool[ 'show' ] === false) {
                continue;
            }

            if ($tool[ 'label' ] === true) {
                $button = $buttons->createButton(language()->getLine('TABLE_BUTTON_' . strtoupper($key)));
                if ( ! empty($tool[ 'icon' ])) {
                    $button->setIcon($tool[ 'icon' ]);
                }
            } else {
                $button = $buttons->createButton(new Ui\Contents\Icon($tool[ 'icon' ]));
                $button->attributes->addAttribute('data-toggle', 'tooltip');
                $button->attributes->addAttribute('title',
                    language()->getLine('TABLE_BUTTON_' . strtoupper($key)));
            }

            if ( ! empty($tool[ 'href' ])) {
                $tool[ 'data-url' ] = $tool[ 'href' ];
            }

            if (isset($tool[ 'attr' ])) {
                foreach ($tool[ 'attr' ] as $name => $value) {
                    $button->attributes->addAttribute($name, $value);
                }
            }

            $button->setContextualClass($tool[ 'contextual' ]);
            $button->smallSize();
            $button->attributes->addAttribute('data-action', $key);
        }

        $tools->childNodes->push($buttons);

        $card->header->childNodes->push($tools);

        // Build table header options
        $options = new Element('div', 'cardHeaderOptions');
        $options->attributes->addAttributeClass(['card-options', 'float-right']);

        $buttons = new Ui\Components\Buttons\Group();
        foreach ($this->options as $key => $option) {
            if ($option[ 'show' ] === false) {
                continue;
            }

            if ($option[ 'label' ] === true) {
                $button = $buttons->createButton(language()->getLine('TABLE_BUTTON_' . strtoupper($key)));
                if ( ! empty($option[ 'icon' ])) {
                    $button->setIcon($option[ 'icon' ]);
                }
            } else {
                $button = $buttons->createButton(new Ui\Contents\Icon($option[ 'icon' ]));
                $button->attributes->addAttribute('data-toggle', 'tooltip');
                $button->attributes->addAttribute('title',
                    language()->getLine('TABLE_BUTTON_' . strtoupper($key)));
            }

            if ( ! empty($option[ 'href' ])) {
                $option[ 'data-url' ] = $option[ 'href' ];
            }

            if (isset($option[ 'attr' ])) {
                foreach ($option[ 'attr' ] as $name => $value) {
                    $button->attributes->addAttribute($name, $value);
                }
            }

            $button->setContextualClass($option[ 'contextual' ]);
            $button->smallSize();
            $button->attributes->addAttribute('data-action', $key);
        }

        $options->childNodes->push($buttons);

        $card->header->childNodes->push($options);

        // Build table body
        $cardBody = $card->createBody();
        $cardBodyRow = $cardBody->createRow();

        $columnSearch = $cardBodyRow->createColumn(['class' => 'col-md-4']);
        $columnShow = $cardBodyRow->createColumn(['class' => 'col-md-8']);

        // Search
        $search = new Ui\Components\Form\Elements\Input([
            'name'        => 'query',
            'data-role'   => 'table-crud-search',
            'placeholder' => language()->getLine('TABLE_LABEL_SEARCH'),
            'value'       => input()->get('query'),
        ]);

        $columnSearch->childNodes->push($search);

        // Show
        $inputGroup = new Ui\Components\Form\Input\Group();

        $addOn = new Ui\Components\Form\Input\Group\AddOn();
        $addOn->textContent->push(language()->getLine('TABLE_LABEL_SHOW'));

        $inputGroup->childNodes->push($addOn);

        $options = [];
        foreach (range((int)$this->config[ 'entries' ][ 'minimum' ], (int)$this->config[ 'entries' ][ 'maximum' ],
            (int)$this->config[ 'entries' ][ 'step' ]) as $entries
        ) {
            $options[ $entries ] = $entries;
        }

        $columnsDropdown = new Ui\Components\Dropdown(language()->getLine('TABLE_LABEL_COLUMNS'));
        $columnsDropdown->attributes->addAttribute('data-role', 'table-crud-columns');

        foreach ($this->columns as $key => $column) {

            if ($column[ 'hiding' ] === false) {
                continue;
            }

            $label = new Ui\Components\Form\Elements\Label();
            $label->attributes->addAttributeClass('form-check-label');
            $label->textContent->push(language()->getLine($column[ 'label' ]));

            $checkbox = new Ui\Components\Form\Elements\Input([
                'type'        => 'checkbox',
                'class'       => 'form-check-input',
                'data-toggle' => 'table-crud-columns',
                'data-column' => $key,
            ]);

            $checkbox->attributes->removeAttributeClass('form-control');

            if ($column[ 'show' ] === true) {
                $checkbox->attributes->addAttribute('checked', 'checked');
            }

            $label->childNodes->push($checkbox);

            $columnsDropdown->menu->createItem($label);
        }

        $inputGroup->childNodes->push($columnsDropdown);

        $select = new Ui\Components\Form\Elements\Select();
        $select->attributes->addAttribute('name', 'entries');
        $select->createOptions($options, $showEntries);
        $inputGroup->childNodes->push($select);

        $addOn = new Ui\Components\Form\Input\Group\AddOn();
        $addOn->textContent->push(language()->getLine('TABLE_LABEL_PAGE', [
            $startNumber,
            $totalEntries,
            $totalRows,
            $currentPage,
            $totalPages,
        ]));

        $inputGroup->childNodes->push($addOn);

        $input = new Ui\Components\Form\Elements\Input([
            'name'        => 'page',
            'placeholder' => language()->getLine('TABLE_LABEL_GOTO'),
        ]);

        $inputGroup->childNodes->push($input);

        $pagination = new Ui\Components\Pagination($totalRows, $showEntries);
        $inputGroup->childNodes->push($pagination);

        $columnShow->childNodes->push($inputGroup);

        $card->textContent->push(parent::render());

        return $card->render();
    }
1007143
def draw_footer footers_to_print, source
            footers_to_print.reverse_each do |group|
                draw_line(@posY + @sections[:body][:settings][:height]/2)
                source[group][:footer].each do |field, settings|
                    settings = [settings[0], @posY, (@defaults.merge (settings[1] || { }).symbolize_keys!)]
                    settings[2][:style] = settings[2][:style].to_sym
                    set_options settings[2]
                    draw_text @footers[group][field], settings
                end
                draw_line(@posY - @sections[:body][:settings][:height]/4)
                set_pos_y @sections[:body][:settings][:height]

                reset_footer group
            end
        end
403463
def show
      @invoice = MnoEnterprise::Invoice.where(slug: params[:id].upcase).reload.first

      respond_to do |format|
        if @invoice
          filename = "Invoice - #{@invoice.slug}.pdf"
          pdf_view = MnoEnterprise::InvoicePdf.new(@invoice).render
          format.html { send_data pdf_view, filename: filename, type: "application/pdf", disposition: 'inline'  }
        else
          format.html { redirect_to root_path, alert: 'Sorry, the page requested could not be displayed' }
        end
      end
    end
479268
public function footer()
    {
        if ($this->failures) {
            $this->output->write($this->getCountString($this->failures, true));
            $this->output->write(',');
        }

        $this->output->write($this->getCountString($this->successes, false));
        $this->output->writeln(sprintf(' (%d total)', $this->failures + $this->successes));
    }
716546
function start_html() {
        global $OUTPUT;

        // Render button to allow user to reset table preferences.
        echo $this->render_reset_button();

        // Do we need to print initial bars?
        $this->print_initials_bar();

        // Paging bar
        if ($this->use_pages) {
            $pagingbar = new paging_bar($this->totalrows, $this->currpage, $this->pagesize, $this->baseurl);
            $pagingbar->pagevar = $this->request[TABLE_VAR_PAGE];
            echo $OUTPUT->render($pagingbar);
        }

        if (in_array(TABLE_P_TOP, $this->showdownloadbuttonsat)) {
            echo $this->download_buttons();
        }

        $this->wrap_html_start();
        // Start of main data table

        echo html_writer::start_tag('div', array('class' => 'no-overflow'));
        echo html_writer::start_tag('table', $this->attributes);

    }
1235088
private function runPageHeader()
    {
        foreach ($this->pageHeaderElements as $element) {
            if ($element instanceof ReportBaseElement) {
                $element->render($this);
            } elseif ($element === 'footnotetexts') {
                $this->footnotes();
            } elseif ($element === 'addpage') {
                $this->addPage();
            }
        }
    }
319873
public function draw($pages)
    {
        if($this->isProcessed())
        {
            throw new LogicException(sprintf('Pdf has alredy been drawed.'));
        }

        $this->processed = true;


        if(is_array($pages))
        {
            $pageCollection = new PageCollection();

            foreach($pages as $page)
            {
                if(!$page instanceof Page)
                {
                    throw new DrawingException(sprintf('Not all elements of passed array are PHPPdf\Core\Node\Page type. One of them is "%s".', get_class($page)));
                }

                $pageCollection->add($page);
            }
        }
        elseif($pages instanceof PageCollection)
        {
            $pageCollection = $pages;
        }
        else
        {
            throw new InvalidArgumentException(sprintf('Argument of draw method must be an array of pages or PageCollection object, "%s" given.', get_class($pages)));
        }

        $pageCollection->format($this);

        $tasks = $pageCollection->getAllDrawingTasks($this);
        $this->invokeTasks($tasks);
    }
929265
public function renderPageSummary()
    {
        $content = parent::renderPageSummary();

        if ($this->showCustomPageSummary) {
            if (!$content) {
                $content = "<tfoot></tfoot>";
            }

            if ($this->beforeSummary) {
                foreach ($this->beforeSummary as &$row) {
                    if (!isset($row['options'])) {
                        $row['options'] = $this->pageSummaryRowOptions;
                    }
                }
            }

            if ($this->afterSummary) {
                foreach ($this->afterSummary as &$row) {
                    if (!isset($row['options'])) {
                        $row['options'] = $this->pageSummaryRowOptions;
                    }
                }
            }

            return strtr(
                $content,
                [
                    '<tfoot>' => "<tfoot>\n" . parent::generateRows($this->beforeSummary),
                    '</tfoot>' => parent::generateRows($this->afterSummary) . "\n</tfoot>",
                ]
            );
        }

        return $content;
    }
1204375
private function footer()
    {
        $footer = $this->footer_content;
        if ($footer) {
            if ($this->header_type == self::OPT_HEADER_PRE) {
                $footer = str_replace("\n", '', $footer);;
            }
            $footer = $this->replace_keywords($footer);

            if ($this->use_classes) {
                $attr = ' class="foot"';
            }
            else {
                $attr = " style=\"{$this->footer_content_style}\"";
            }
            if ($this->header_type == self::OPT_HEADER_PRE_TABLE && $this->line_numbers != self::OPT_LINE_NUMBERS_NONE) {
                $footer = "<tfoot><tr><td colspan=\"2\">$footer</td></tr></tfoot>";
            }
            else {
                $footer = "<div$attr>$footer</div>";
            }
        }

        if (self::OPT_HEADER_NONE == $this->header_type) {
            return ($this->line_numbers != self::OPT_LINE_NUMBERS_NONE) ? '</ol>' . $footer : $footer;
        }

        if ($this->header_type == self::OPT_HEADER_DIV || $this->header_type == self::OPT_HEADER_PRE_VALID) {
            if ($this->line_numbers != self::OPT_LINE_NUMBERS_NONE) {
                return "</ol>$footer</div>";
            }

            return ($this->force_code_block ? '</div>' : '') .
                   "$footer</div>";
        }
        elseif ($this->header_type == self::OPT_HEADER_PRE_TABLE) {
            if ($this->line_numbers != self::OPT_LINE_NUMBERS_NONE) {
                return "</tr></tbody>$footer</table>";
            }

            return ($this->force_code_block ? '</div>' : '') .
                   "$footer</div>";
        }
        else {
            if ($this->line_numbers != self::OPT_LINE_NUMBERS_NONE) {
                return "</ol>$footer</pre>";
            }

            return ($this->force_code_block ? '</div>' : '') .
                   "$footer</pre>";
        }
    }
6603
public function Footer()
    {
        $this->SetY(-15);
        $this->billetSetFont('footer');
        $this->Cell(88.5, 5, $this->PageNo() . " / $this->AliasNbPages");
        $this->Cell(88.5, 5, date('Y-m-d H:i:s O'), 0, 0, 'R');
    }
905249
protected function buildFooter()
    {
        if (! $this->footer) {
            return;
        }

        $this->html .= $this->indent(3, '<div class="modal-footer">');
        $this->html .= $this->indent(4, $this->footer);
        $this->html .= $this->indent(3, '</div>');
    }