Set Footer on Page 2 only in mpdf version 6.0

Viewed 471

I have two pages in PDF using mpdf version 6.0 and trying to set Footer in second page only. 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 am unable to set footer for Page 2 only. Is that possible?

1 Answers

After checking the php verison. I have come to conclusion.

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

Related