如何为mpdf添加进度条

时间:2017-03-29 09:45:09

标签: php mpdf

我已经通过mpdf库生成了pdf,我的pdf需要4-5分钟才能生成pdf。 我想添加百分比进度条以显示生成pdf时的进度。

如何为百分比进度条添加javascript或php代码以显示进度

2 个答案:

答案 0 :(得分:0)

define('_MPDF_URI','../');     // must be  a relative or absolute URI - not a file system path

$mpdf = new mPDF();

$mpdf->StartProgressBarOutput(2);

$mpdf->WriteHTML('You will hardly have time to see the progress bars!');

$mpdf->Output();

来自来源Link

答案 1 :(得分:0)

尝试使用此方法:

https://mpdf.github.io/reference/mpdf-functions/startprogressbaroutput.html

在页面底部是示例。