rails-assets icon indicating copy to clipboard operation
rails-assets copied to clipboard

issues with mozilla--pdf.js

Open ChrisCPO opened this issue 5 years ago • 0 comments

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.

ChrisCPO avatar Jul 17 '19 20:07 ChrisCPO