No commit activity in last 3 years
No release in over 3 years
A Rails wrapper for the PDFkit library. Meant to be a drop in replacement for princely.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.4.1
 Project Readme
Ezprint
=======

Ezprint is a drop in replacement for the princely plugin. It uses PDFKit
as the backend instead pf princexml, possibly saving you millions of
dollars. I recommend using the Rack middleware component of PDFKit to
print PDFs in rails, but this plugin makes an easy transition from
prince->PDFKit for those using princely.

Historian
=======

gem 'historian_ezprint',  '~> 1.0', :require => 'ezprint'


Installation
============

Rails 2.x

gem install ezprint
in environment.rb config.gem "ezprint"

Rails 3

gem 'ezprint', :git => 'git@github.com:jstewart/ezprint.git', :branch => 'rails3', :require => 'ezprint'
then run "bundle install"

Example
=======

The examples here are similar to princely, since the
plugin is basically a reworking of the princely source

class PDFExample < ApplicationController
  def show
    respond_to do |format|
      format.html
      format.pdf do
        render :pdf => "My Awesome PDF",
               :template => "controller/action.pdf.erb",
               :stylesheets => ["application","print"]
               :layout => "pdf"
      end
    end
  end

  # Alternatively, you can use make_and_send_pdf to
  # render out a PDF for the action without a
  # respond_to block.
  def pdf
    make_and_send_pdf("file_name")
  end
end

Render Defaults
===============

The defaults for the render options are as follows:

layout:      false
template:    the template for the current controller/action
stylesheets: none

Credits
=======

Michael Bleigh for writing the awesome princely plugin, which most of the code is reworked from.

Resources
=========

Copyright (c) 2010 Jason Stewart, released under the MIT license.