aliasNbPgGp
Variable which defines the text to be replaced by the total page number in the page group.
Default: '{nbpg}'
You can assign this value directly, or use the function: AliasNbPageGroups()
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(['aliasNbPgGp' => '[pagegrouptotal]']);
Examples
<?php
// Require composer autoload
require_once __DIR__ . '/vendor/autoload.php';
$mpdf = new \Mpdf\Mpdf(['aliasNbPgGp' => '[pagegrouptotal]']);
$mpdf->SetHeader('Your header [pagegrouptotal]');
$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
- aliasNbPg - Specify the text to be replaced by the document page total