Sha256: 730388bef8ed2c55a7346eeb2f1675d06e5eb1ea5e526feab9ecc9d28ea8b94e

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

[![Build Status](https://travis-ci.org/mohanraj-ramanujam/pdfjs.svg?branch=master)](https://travis-ci.org/mohanraj-ramanujam/pdfjs)
[![Gem Version](https://badge.fury.io/rb/pdfjs.svg)](http://badge.fury.io/rb/pdfjs)

### PDFJS Information

PDFJS is a RAILS ENGINE plugin for integrating the PDFJS into the RAILS applications.

* Is a RAILS ENGINE;
* Is composing of PDFJS images, javascripts and stylesheets;
* Is contains PDFJS HTML layout;

### How To Integrate with RAILS application

* Create a separate controller inherited from Pdfjs::PdfjsController

```ruby
class PDFController < PdfjsController
end
```
* Define your action. EX: show.

```ruby
class PDFController < PdfjsController
  def show
    @pdfjs_file = 'http://yoursite.com/pdfjs.pdf'
  end
end
```
* Create the show template and set the PDF file path

```html
<%= content_for :pdfjs do %>
  <%= javascript_tag do %>
    window.DEFAULT_URL = '<%= @pdfjs_file.html_safe %>';
  <% end %>
<% end %>
```

### Example applications

* https://github.com/mohanraj-ramanujam/pdfjs

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pdfjs-0.0.3 README.rdoc