seven1m / prawn_template_handler
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
README.markdown | ||
| |
init.rb | ||
| |
lib/ | Fri Dec 26 09:27:06 -0800 2008 |
README.markdown
prawn_template_handler
This is a template handler for Prawn PDF views in Rails. Simpler than Prawnto.
Installation
script/plugin install git://github.com/seven1m/prawn_template_handler.git
Usage
The template registers the pdf mimetype, and the prawn template extension.
In the view file show.pdf.prawn:
pdf.move_down 200
pdf.text 'Hello World'
That's it!
If you need to specify document options, add a @pdf line to your show method, like so:
def show
@pdf = Prawn::Document.new(:page_layout => :landscape)
end
License
Released into the Public Domain.

