aliasNbPg
Variable which defines the text to be replaced by the total page number in the document.
Default: '{nb}'
You can assign this value directly, or use the function: AliasNbPages()
Note: This variable originally started with an uppercase letter (mPDF ≤ 2.2). Support for the uppercase version was removed in mPDF ≥ 6.0
Usage
Set at document initiation
<?php
$mpdf = new \Mpdf\Mpdf(['aliasNbPg' => '[pagetotal]']);
Examples
<?php
// Require composer autoload
require_once __DIR__ . '/vendor/autoload.php';
$mpdf = new \Mpdf\Mpdf(['aliasNbPg' => '[pagetotal]']);
$mpdf->SetHeader('Your header [pagetotal]');
$mpdf->WriteHTML("Hello World");
$mpdf->Output();
See Also
- pagenumPrefix - Specify text to precede page numbers generated by
{PAGENO}
- pagenumSuffix - Specify text to follow page numbers generated by
{PAGENO}
- nbpgPrefix - Specify text to precede page total generated by
{nbpg}
- nbpgSuffix - Specify text to follow page numbers generated by
{nbpg}
- Page numbering
- Replaceable aliases
- aliasNbPgGp - Specify the text to be replaced by the group page total