public function setFooter(array $data, string $side = 'both'): PdfInterface
    {
        $data = array_change_key_case($data, CASE_LOWER);

        $footer = ('<table width="100%" style="vertical-align: bottom; font-family: arial; font-size: 9pt; color: #000000; font-weight: bold; font-style: italic;"><tr>'.
                        $this->setFooterContent('left', (string) $data['left']).
                        $this->setFooterContent('center', (string) $data['center']).
                        $this->setFooterContent('right', (string) $data['right']).
                    '</tr></table>');

        $this->setProperty('pageFooter', $footer, $side);
        $this->mpdf->mirrorMargins = false;  // if unique sides -> true
        $this->mpdf->SetHTMLFooter($this->getProperty('pageFooter', $side), 'O'); // Odd = 'O', Even = 'E'

        return $this;
    }
public function setFooter(array $data, string $side = 'both'): PdfInterface
    {
        $data = array_change_key_case($data, CASE_LOWER);

        $footer = ('<table width="100%" style="vertical-align: bottom; font-family: arial; font-size: 9pt; color: #000000; font-weight: bold; font-style: italic;"><tr>'.
                        $this->setFooterContent('left', (string) $data['left']).
                        $this->setFooterContent('center', (string) $data['center']).
                        $this->setFooterContent('right', (string) $data['right']).
                    '</tr></table>');

        $this->setProperty('pageFooter', $footer, $side);
        $this->mpdf->mirrorMargins = false;  // if unique sides -> true
        $this->mpdf->SetHTMLFooter($this->getProperty('pageFooter', $side), 'O'); // Odd = 'O', Even = 'E'

        return $this;
    }
public function setFooter ( array $ data , string $ side = 'both' ) : PdfInterface { $ data = array_change_key_case ( $ data , CASE_LOWER ) ; $ footer = ( '<table width="100%" style="vertical-align: bottom; font-family: arial; font-size: 9pt; color: #000000; font-weight: bold; font-style: italic;"><tr>' . $ this -> setFooterContent ( 'left' , ( string ) $ data [ 'left' ] ) . $ this -> setFooterContent ( 'center' , ( string ) $ data [ 'center' ] ) . $ this -> setFooterContent ( 'right' , ( string ) $ data [ 'right' ] ) . '</tr></table>' ) ; $ this -> setProperty ( 'pageFooter' , $ footer , $ side ) ; $ this -> mpdf -> mirrorMargins = false ; // if unique sides -> true $ this -> mpdf -> SetHTMLFooter ( $ this -> getProperty ( 'pageFooter' , $ side ) , 'O' ) ; // Odd = 'O', Even = 'E' return $ this ; }
Set the page footer.

{@note: printing even/odd pages is not available yet.}

@param array  $data The list of footer items ('left','center','right')
@param string $side The option for unique even/odd page printing ('both','even','odd')

@return PdfInterface The current instance

@api
Set the page footer .