How can I get the progress of dompdf. I have a lot of html that is being converted into pdf using dompdf. Because the HTML is a lot it takes a while so I want to know if its possible to get the progress and display it to the user.
Edit:
According to suggestion I have decided to use a spinner. But I need to know when the file is received by the user. I'm using this code to generate the pdf which is copied from here:
$dompdf = new Dompdf();
$dompdf->loadHtml('hello world');
// (Optional) Setup the paper size and orientation
$dompdf->setPaper('A4', 'landscape');
// Render the HTML as PDF
$dompdf->render();
// Output the generated PDF to Browser
$dompdf->stream();
The pdf is generated when a user presses a link that executes this code. The pdf downloads and shows in the downloads section.
Edit 2: Now I am trying to handle the download with ajax. I am receiving the data and I can see it when I do console.log() but how do I get the file to be saved in the users downloads?? Thanks