Sha256: b765b5a679b6f93317c07c6fd256908fca2d0a13c26a1fd7bae54052ac95592c

Contents?: true

Size: 1.28 KB

Versions: 14

Compression:

Stored size: 1.28 KB

Contents

= Princely

Princely is a simple wrapper for the Prince XML PDF generation library 
(http://www.princexml.com). The plugin will also automatically registers 
the PDF MimeType so that you can use pdf as a format in controller 
respond_to blocks.

== Example

    class Provider::EstimatesController < Provider::BaseController
      # You can render PDF templates simply by
      # using the :pdf option on render templates.
      def show
        respond_to do |format|
          format.html
          format.pdf do
            render :pdf => "file_name", 
                   :template => "controller/action.pdf.erb",
                   :stylesheets => ["application","prince"]
                   :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

== Contributors

* Gemification and more: Nic Williams

== Resources

* Copyright (c) 2007-2009 Michael Bleigh and Intridea, Inc., released under the MIT license.

Version data entries

14 entries across 14 versions & 5 rubygems

Version Path
mbleigh-princely-1.2.4 README.rdoc
mbleigh-princely-1.2.5 README.rdoc
yellowlab-princely-1.2.5.yellowlab.5 README.rdoc
yellowlab-princely-1.2.5.yellowlab.4 README.rdoc
yellowlab-princely-1.2.5.yellowlab.3 README.rdoc
fa_princely-1.2.7 README.rdoc
fa_princely-1.2.6 README.rdoc
fa_princely-1.2.5 README.rdoc
yellowlab-princely-1.2.5.yellowlab.2 README.rdoc
yellowlab-princely-1.2.5.yellowlab.1 README.rdoc
matthewmacleod-princely-1.2.6 README.rdoc
matthewmacleod-princely-1.2.5 README.rdoc
princely-1.2.5 README.rdoc
princely-1.2.4 README.rdoc