I need to show some sort of indicator while the PDF is loading. I'm displaying PDFs that can take 40 seconds or longer to be generated and embedded.
I'm aware that I can check to see if the PDFObject embedded successfully (by using this example). However, this doesn't give an indication when the file finished downloading.
I'm also aware that I can style it. However, that doesn't work either, since it retains that style after the PDF loaded. Also, while I can style the border, positioning, height, etc of the object, I can't get attributes like cursor
to work:
#pdf object {
border: 5px solid red; // does work, but still shows up after the PDF loads
cursor: progress !important; // doesn't work
}
Is there any way I can see when the file successfully downloaded?
I know this is still a old post but if you still looking for a solution. you can try to make a
<div>
position relative and then the spinner inside the div absolute withz-index
of 99 and then the pdfobject also with a position relative andz-index
99 that way the pdfobject will go on top of the spinner than is looks like the pdf is loaded.