This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
princely /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Thu Aug 20 21:10:47 -0700 2009 | |
| |
MIT-LICENSE | Mon Dec 17 07:55:59 -0800 2007 | |
| |
README.rdoc | Sat Sep 19 18:28:27 -0700 2009 | |
| |
Rakefile | Sat Sep 19 18:28:27 -0700 2009 | |
| |
VERSION | Sat Sep 19 19:51:20 -0700 2009 | |
| |
init.rb | Sat Sep 19 19:51:05 -0700 2009 | |
| |
lib/ | Sun Oct 25 10:41:14 -0700 2009 | |
| |
princely.gemspec | Sat Sep 19 19:51:20 -0700 2009 | |
| |
rails/ | Sat Sep 19 19:51:05 -0700 2009 |
README.rdoc
Princely
Princely is a simple wrapper for the Prince XML PDF generation library (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 © 2007-2009 Michael Bleigh and Intridea, Inc., released under the MIT license.







