ng2-pdf-viewer: Loading spinners never go away

Bug Report or Feature Request (mark with an x)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [ ] Bug report -> please search issues before submitting
- [ ] Feature request
- [x ] Documentation issue or request

This library has been working great for us for a while, but have come across this one pdf that only ever shows the spinning loaders (unfortunately I can’t share the PDF here since it belongs to a client). (error) never fires, but (after-load-complete) and (on-progress) do. onProgress just fires one time saying the load is complete {loaded: 63290, total: 63290}. We are supplying the src url (something like https://attachments.hey.com/blah.pdf). One thing worth noting is if I download the PDF and then input the file to the demo it works fine. Any suggestions on things I could try with this PDF? Very much at a loss. This pdf is 3 small business cards and the pdfInfo recognizes it as such saying it has 3 pages

image

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 3
  • Comments: 17 (3 by maintainers)

Most upvoted comments

In short pdfjs-dist thinks that your page is not in the viewable area and chooses not to render the pages to conserve resources.

This helped

I was using pdf-viewer in a tab which was initialized but not visible until clicked on. I was able to make viewer working by rendering viewer only when tab with it opened by user.

Having a similar issue, when the pdf src is similar for two consecutive requests, the onloadComplete and onError methods are not fired and hence the loader does not stop.

I had the same issue on our page only when viewed in 4k, fixed with the position relative parent

I have the same problem. If I change zoom of pdf preview, some of these pages is loading infinitely. screen shot 2018-11-30 at 4 04 27 pm If I change zoom on the https://vadimdez.github.io/ng2-pdf-viewer with your default pdf, spinner is loading infinitely as well. The zoom have to be pretty small. The size should be 0.3 or less.