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

Does the same pdf work here https://vadimdez.github.io/ng2-pdf-viewer/ ?
Ya, that's what I was not so clearly trying to convey. If I download the PDF and then go there and click "Choose file" it does work just fine. And again this particular PDF is definitely an anomaly, been a while since anyone has mentioned a PDF not loading. The only thing I can think that's different about it is the small pages, but of course it does work in your demo. Sorry, I know I'm not giving you very much to go off of. Appreciate you taking the time to look into it at all.
I cant just input the url into your demo though because of CORS issues, have to actually download it and then Choose the file. Anything you can think of trying? Thanks
I have the same problem. If I change zoom of pdf preview, some of these pages is loading infinitely.

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.
This issue could be related to #422.
If so, posting your styling and template could help create a reproduction.
In short pdfjs-dist thinks that your page is not in the viewable area and chooses not to render the pages to conserve resources.
You can also try rendering the pdf with the base pdfjs-dist library here, to check if it is an issue with the underlying renderer or ng2-pdf-viewer.
Also, you can overcome CORS issues for development purposes with https://cors-anywhere.herokuapp.com/
Facing the same issue in my angular 6 application.
@ColinT : Thanks for the CORS issue fix. That worked!
The pdf downloads fine (able to notice it in the browser's network traffic).
Seeing loading gif in the DOM for each page of my pdf. The DOM for the pdf page is not getting generated resulting in the same result ( as per screenshots of @sjsnider )
In short
pdfjs-distthinks 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.
In short
pdfjs-distthinks 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.
Same for me I was using bootstrap tab so I aded a *ngIf clause to render my component with the pdf-viewer to make it work and remove the infinite loading spinner.
All the above didn't work for me and I think it might be related to https://github.com/VadimDez/ng2-pdf-viewer/issues/364
Any good fix for this issues, thanks?
I had the same issue on our page only when viewed in 4k, fixed with the position relative parent
Fixed in 6.0.0 See https://github.com/VadimDez/ng2-pdf-viewer/blob/master/CHANGELOG.md#600
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.
How to find the solution, i can not update to new angular, i am stuck on 4
Most helpful comment
Fixed in
6.0.0See https://github.com/VadimDez/ng2-pdf-viewer/blob/master/CHANGELOG.md#600