Pergunta

I have recently downloaded GIT pdf.js. The problem is that it is not working neither on my laptop nor on the server!

Here is how it should look like: http://mozilla.github.io/pdf.js/web/viewer.html

This viewer is, by far, the best out there I think, and it would be really great if someone can help me get it working!

I have saved the complete web page, downloaded all images. The .css and images are enough to get it the elegant design, but it either gives an error saying it couldn't load the pdf or the pre-loader keeps going on.

I have also tried downloading their file; and noticed somewhere that if I upload it with the src folder, it should work but well - the first idea (saving the page) had better results.

Foi útil?

Solução 2

If anyone is interested, I asked, back then, the same question in the developer site, and the problem was solved; please refer to this site if you are facing the same problem: https://github.com/mozilla/pdf.js/issues/3508

Outras dicas

I had quick look at the code and can see it's doing a few ajax requests (with XMLHttpRequest) to load resources. Seeing that you're trying to open it from your local machine, the http request will fail, because it can't load it directly from disk. Your best bet will be to host it locally and then try again.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top