I'm generating a very large pdf file on my PHP application. The document can reach over 300 pages. The build process may take more than 40 seconds
, that's why I want to show the user a message to understand that the file is being generated.
The problem is that when i set $this->progressBar = 1;
on config.php
file, the progress shows perfect, but when the proces finish, I'm only getting a Finished message, and i'm not redirected to the file.
Heres' my code:
<?php
ob_start();
include('include/mpdf/mpdf.php');
define('_MPDF_URI','../');
$mpdf = new mPDF('','A4', 9, 'freesans', 10, 10, 20, 15, 5, 5, 'L');
$mpdf->SetHTMLHeader($cabecera);
$mpdf->setFooter("Pagina {PAGENO} de {nb}");
$html=utf8_encode($html);
$mpdf->WriteHTML($html);
$mpdf->Output();
ob_end_flush();
I believe someone already has gone through this problem. Please guide me on how I can solve this problem.
Thank you,