如何在mpdf中获取当前页码 [英] How To get the current page number in mpdf

查看:77
本文介绍了如何在mpdf中获取当前页码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 mpdf 和库生成 pdf 报告,我想获取当前页码,以便在生成 pdf 时获取当前页码.

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.

谢谢

推荐答案

将此添加到主 mPDF 类:

add this to a main mPDF class:

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

并使用这样的东西:

$PageCount = $this->getPageCount();

这篇关于如何在mpdf中获取当前页码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆