Gem Version

jsPDF is a library for creating PDF files in client-side JavaScript. This Gem packages jsPDF for Ruby on Rails' asset pipeline

License: MIT License (just like jsPDF)

Rails: 3.1 and up

Installation

Add this line to your application's Gemfile:

gem 'jspdf-rails'

And then execute:

$ bundle

Usage

Include the javascript part:

For Coffeescript

#= require 'jspdf'

For JavaScript

//= require 'jspdf'

Be sure to include JQuery or Zepto before requiring jsPDF.