Open ChrisCPO opened 5 years ago
https://rails-assets.org/#/components/mozilla--pdf.js
docs say:
//= require mozilla--pdf.js //= require jquery //= require jquery_ujs //= require turbolinks
However this did not work, by digging through the gem. I had to do:
//= require pdf.js.js //= require jquery //= require jquery_ujs //= require turbolinks
Also I have come across issues post requiring this (Uncaught ReferenceError: require is not defined). I believe this gem needs built with the prebuilt 'pdfjs-dist' https://github.com/mozilla/pdf.js#using-pdfjs-in-a-web-application.
Uncaught ReferenceError: require is not defined
https://rails-assets.org/#/components/mozilla--pdf.js
docs say:
However this did not work, by digging through the gem. I had to do:
Also I have come across issues post requiring this (
Uncaught ReferenceError: require is not defined
). I believe this gem needs built with the prebuilt 'pdfjs-dist' https://github.com/mozilla/pdf.js#using-pdfjs-in-a-web-application.