Question

I am generating the pdf report using the mpdf and library , i wanted to get the current page number so that i can get the current page number while iam generating the pdf.

Thanks

Was it helpful?

Solution

add this to a main mPDF class:

function getPageCount() {
    return count($this->pages);
}

and use something like this:

$PageCount = $this->getPageCount();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top