pdfjs_viewer-rails | PDF.js viewer packaged as a Rails engine | Document Editor library
kandi X-RAY | pdfjs_viewer-rails Summary
kandi X-RAY | pdfjs_viewer-rails Summary
PDF.js viewer packaged as a Rails engine.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pdfjs_viewer-rails
pdfjs_viewer-rails Key Features
pdfjs_viewer-rails Examples and Code Snippets
Community Discussions
Trending Discussions on pdfjs_viewer-rails
QUESTION
I'm using pdfjs_viewer-rails gem and when I try to load a custom PDF in this way
...ANSWER
Answered 2019-Nov-29 at 20:09You could proxy the PDF file through your own server. This should resolve any issues you have with CORS or other cross-domain problems.
Step 1 - Add new route for proxy controllerQUESTION
I use the gem pdfjs_viewer-rails for my Rails application and Carrierwave to store my PDF's on Amazon S3. When i link to a PDF-url i with the mounted route specified by the gem:
...ANSWER
Answered 2017-Jun-28 at 10:46If any one has the same problem - i found a solution.
I tried with another gem: pdfjs_rails
And followed his instructions.
So my conclusion is: try this gem!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pdfjs_viewer-rails
If you plan to load PDFs from that are hosted on another domain from the PDF.js viewer, you may need to set up a Cross-Origin Resource Sharing (CORS) Policy to allow PDF.js to read PDFs from your domain. If you're serving PDFs straight from Amazon S3 (e.g. bucket.s3-us-west-1.amazonaws.com), you will need to add a CORS policy to the S3 bucket. This CORS configuration has been tested on S3:.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page