senny / pdfjs_viewer-rails

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

Allow to load an external custom stylesheet #26

Closed kle-roy closed 7 years ago

kle-roy commented 8 years ago

In order to get a branded viewer, I need to be able to overwrite some styles through an external stylesheet.

This PR aims to do that setting the custom stylesheet name through PdfjsViewer.custom_stylesheet and loading it into _viewer.html.erb.

senny commented 8 years ago

Thanks for the PR. I can see the need for customization but I'd like to keep it very high level and flexible. This patch only allows for exactly one stylesheet. What If you need to add other things to the header? What if we made the viewer.html.erb more flexible to account for customizations?

siegy22 commented 7 years ago

@kle-roy this feature is implemented with #38, but way more flexible than your solution. Hope that's okay for you!

Gonna close your PR here, because it's probably stale :smile: