Skip to content

eduvo/pdfjs-rails-engine

 
 

Repository files navigation

PDFJS RAILS Engine

This gem integrate Mozilla’s awesome PDF.jS javascript library to your Rails project. Here is the original pdf.js repo: github.com/mozilla/pdf.js/

NOTE: This is not yet optimized. Only experimental. Only works with pdfs stored in your rails app.

Instructions:

1 Add this to your GEMFILE:

gem 'pdfjs-rails-engine', github: "normancapule/pdfjs-rails-engine"

2 Mount the Gem’s routes to your routes (routeception):

mount PdfjsRailsEngine::Engine

3 View your pdfs in the viewer with this url pattern:

/#{your-path-to-the-pdf-viewer}?file=/PDF.pdf

To do:

Add l10n resources of the pdf.js repo
Minify all the js libraries (Only pdf.js and pdf.worker.js are minified)
Allow pdf viewer to access remote urls

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 86.0%
  • Java 10.3%
  • HTML 3.2%
  • Other 0.5%