mPDF Manual – mPDF Variables

nbpgPrefix

(mPDF >= 3.0)

Description

string nbpgPrefix

Specify text to precede the page total generated by {nbpg }.  $(There should be no space after the ‘g’. This is put here to allow it to print in mPDF)

Examples

Example #1

<?php

$mpdf = new mPDF();

$mpdf->pagenumPrefix = 'Page number ';

$mpdf->pagenumSuffix = ' - ';

$mpdf->nbpgPrefix = ' out of ';

$mpdf->nbpgSuffix = ' pages';

$mpdf->SetHeader('{PAGENO}{nbpg}');

$mpdf->WriteHTML("Hallo World");

$mpdf->Output();

?>
Will output a header:

"Page number 1 - out of 1 pages"

See Also