Progress bar

232 views
Skip to first unread message

Nelson Araújo Ibrahim

unread,
May 15, 2012, 5:30:16 PM5/15/12
to dompdf
Hi. Can you put a progress bar at the time to wait for the
generation .pdf?

BrianS

unread,
May 15, 2012, 10:33:46 PM5/15/12
to dom...@googlegroups.com
On Tuesday, May 15, 2012 5:30:16 PM UTC-4, Nelson Araújo Ibrahim wrote:
Hi. Can you put a progress bar at the time to wait for the
generation .pdf?

Do you mean provide the information necessary so that the browser displays an accurate progress bar? Or are you talking about some kind of rendering progress bar?

Nelson Araújo Ibrahim

unread,
May 18, 2012, 7:18:13 PM5/18/12
to dompdf
Good evening Brian. Thanks for the feedback. It would be interesting
to make a progress bar based on the file to be generated. I'm
generating .pdf of 400 KB and the screen is getting blank long before
the ,pdf is generated successfully. Any idea how can I do this?

On 15 maio, 23:33, BrianS <eclecticg...@gmail.com> wrote:
> Na terça-feira, 15 maio, 2012 05:30:16 UTC-4, Nelson Araújo Ibrahim escreveu:
>
> > Hi. Você pode colocar uma barra de progresso no tempo de espera para o
> > Geração. Pdf?
>
> Você quer dizer fornecer a informação necessária para que o navegador exibe
> uma barra de progresso precisa? Ou você está falando sobre algum tipo de processamento
> barra de progresso?

BrianS

unread,
May 20, 2012, 10:13:03 PM5/20/12
to dom...@googlegroups.com
On Friday, May 18, 2012 7:18:13 PM UTC-4, Nelson Araújo Ibrahim wrote:
Good evening Brian. Thanks for the feedback. It would be interesting
to make a progress bar based on the file to be generated. I'm
generating .pdf of 400 KB and the screen is getting blank long before
the ,pdf is generated successfully. Any idea how can I do this?

That's a bit difficult at present. There's not really anything exposed by dompdf that would make it easy to query about the current progress. I can think of one way we might be able to provide some kind of information, but it would require modifying the code.

I've been using the following process on one of my own sites where documents may take a long time to process
  1. the user submits their job for processing
  2. my script spawns a separate process that actually renders the pdf
  3. at this point the user is presented a screen that indicates the job is in the queue and that they will receive an email when the job is complete
  4. when the rendering is complete the secondary process emails the user a link where the document can be found
I can also think of another way of doing this that is similar to the above. Instead of sending an email, though, the user is presented a page that regularly refreshes (meta refresh or using ajax) to provide a status update, with the final update being "here's your document".

But as I said, currently there's no way to gain information about how far dompdf has gotten (percentage complete) with the rendering task.
Reply all
Reply to author
Forward
0 new messages