Repository is archived
No commit activity in last 3 years
No release in over 3 years
Uber simple template handler for Prawn views in Rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

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.