senny / pdfjs_viewer-rails

PDF.js viewer packaged as a Rails engine.
MIT License
114 stars 174 forks source link

Add warning in Readme #57

Closed abhishek77in closed 4 years ago

abhishek77in commented 5 years ago

As a first time PDF js user I was very confused as how I can not pass in the URL instead of file parameter.

I figured this out using - https://github.com/mozilla/pdf.js/wiki/Viewer-options

This should be made clear in Readme.

Add "file: the path of the PDF file to use (must be on the same server due to JavaScript limitations)"

seanabrahams commented 4 years ago

It works if you follow the CORS setup in the README https://github.com/senny/pdfjs_viewer-rails#setting-up-cors

abhishek77in commented 4 years ago

I think you are right. I must be missing something. It's been a while now, I don't remember the issue. For that reason, will close this issue. Thanks for you response.