The PHP PDF AliasNbPages function is used to add an alias for the total number of pages in a PDF document. This function can be used when you want to reference the total number of pages in the document by a different name, rather than using the variable 'numpages'.
Example:
$pdf = new FPDF(); $pdf->AliasNbPages('totalpages');
In this example, the FPDF package library is used to initiate a new PDF document. The AliasNbPages function is used to create an alias for the total number of pages in the document, called 'totalpages'.
Example:
$pdf->Cell(0,10,'Page '.$this->PageNo().' of '.$this->totalpages,0,0,'C');
This example shows how to reference the alias created earlier, as well as the current page number. The result is a dynamic page numbering system that updates automatically when new pages are added or removed from the document.
The PHP PDF AliasNbPages function is part of the FPDF package library, which is a popular open-source library for creating PDF documents with PHP.
PHP PDF::AliasNbPages - 30 examples found. These are the top rated real world PHP examples of PDF::AliasNbPages extracted from open source projects. You can rate examples to help us improve the quality of examples.