I recently created an php app that generates a big pdf file, this file uses information of a mysql database and creates many tables in the pdf document. In some cases, the document takes almost 3 minutes to be generated. I wish to know if there is a way to display an 'loading' image or animation, or a progress bar (I know it's more complicated to determine the progress) while the document is created.
I use POST method in a form and a submit button with target:_blank, sending 4 parameters that use in the pdf generator file's query.
Isn't very important to know the progress of the creation, I just want users don't think that the script doesn't work or they close the window.
Can anyone help please?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to do the same thing but I am not sure how to approach this without saving the file to the server. I am producing a multi-page PDF that I want to display the "I" option of the Output for TCPDF:
$pdf->Output('Schedule.pdf', 'I');
And I just want to have some indicator to let the user know the page is working and hasn't frozen.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Everyone
I recently created an php app that generates a big pdf file, this file uses information of a mysql database and creates many tables in the pdf document. In some cases, the document takes almost 3 minutes to be generated. I wish to know if there is a way to display an 'loading' image or animation, or a progress bar (I know it's more complicated to determine the progress) while the document is created.
I use POST method in a form and a submit button with target:_blank, sending 4 parameters that use in the pdf generator file's query.
Isn't very important to know the progress of the creation, I just want users don't think that the script doesn't work or they close the window.
Can anyone help please?
I'd save the PDF to file and then do an AJAX check in the browser to see if the file exists yet.
I'm new in AJAX... could you share the code or explain how to do it please?
I am trying to do the same thing but I am not sure how to approach this without saving the file to the server. I am producing a multi-page PDF that I want to display the "I" option of the Output for TCPDF:
And I just want to have some indicator to let the user know the page is working and hasn't frozen.