Closed abhishek77in closed 4 years ago
It works if you follow the CORS setup in the README https://github.com/senny/pdfjs_viewer-rails#setting-up-cors
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.
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)"