mPDF Manual – mPDF functions

AliasNbPages()

(mPDF ≥ 1.0)

AliasNbPages – Defines the placeholder used to insert total number of pages into the document

Defines the text for the variable $aliasNbPg. Default: '{nb}' Examples Example #1 <?php$mpdf = new \Mpdf\Mpdf();

$mpdf->AliasNbPages('[pagetotal]');$mpdf->WriteHTML('
There are [pagetotal] pages in this document
');

$mpdf->Output();  Example #2 <?php$mpdf->AliasNbPages('[pagetotal]');

is the exact equivalent of:

\$mpdf->aliasNbPg = '[pagetotal]';