Sha256: df2906f862474cf12409b1fdba8f3958799b1aba3ebb89ec0e5d0429db086e5e

Contents?: true

Size: 1.33 KB

Versions: 2

Compression:

Stored size: 1.33 KB

Contents

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.

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.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ezprint-0.1.1 README
ezprint-0.1.0 README