Set footer on page 2 in mpdf 6.0 only

I have two pages in PDF format using mpdf version 6.0 and trying to install Footer only on the second page. Below is my code.

include("mpdf/mpdf.php");

$mpdf=new mPDF(''); 
$mpdf=new mPDF('c','A4','' ,10 , 0 , 0 , 8, 0);

$mpdf->WriteHTML("html for Page 1");

$mpdf->AddPage('P','','','','',10,10,10,10,10,10);

$mpdf->WriteHTML("html for Page 2");

$Footer ='Footer Html';
$mpdf->SetFooter($Footer);

$mpdf->Output(); 

It seems I can not set the page footer only. Is it possible?

+4
source share
1 answer

After checking php verison. I came to a conclusion.

This code runs on PHP 7.0. This code will not work on PHP 7.1

+2
source

Source: https://habr.com/ru/post/1680795/


All Articles