页脚使用MPDF居中

I have this pdf: enter image description here

How can I make the page numbering centered instead of right alignment? This is how I added the page numbering:

   include("mpdf60/mpdf.php");

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

   $mpdf->setFooter('{PAGENO} of {nbpg}');
 $mpdf->WriteHTML($body);

       $mpdf->Output('Packing Slip.pdf','I');

How can I make it center? its the 'setFooter' ? Im am using mpdf.

you can try the following:

$mpdf->setFooter('|{PAGENO} of {nbpg}|');

This will center align the page numbers. Any thing on the left of first | will be left aligned and anything on the right of second | will be right alligned.

You can set an HTML Footer and give the proper format:

$mpdf->SetHTMLFooter('<div style="text-align: center">{PAGENO} of {nbpg}</div>');

SetHTMLFooter() Function