sbfaulkner / sinatra-prawn

Sinatra extension to add support for pdf rendering with Prawn templates.
MIT License
46 stars 16 forks source link

= sinatra-prawn

sinatra-prawn is an extension for sinatra to enable rendering of pdf files using prawn templates.

== Installation

sudo gem install sbfaulkner-sinatra-prawn -s http://gems.github.com

== Installation from bundler

add these lines to your project Gemfile

source "http://gems.github.com" gem "sbfaulkner-sinatra-prawn"

and run

bundle install

== Example

require 'rubygems' require 'sinatra' require 'sinatra/prawn'

set :prawn, { :page_layout => :landscape }

get '/' do content_type 'application/pdf' prawn :pdf end

END

@@ pdf pdf.text "Hello world!!!!!"

== Legal

Author:: S. Brent Faulkner brentf@unwwwired.net
License:: Copyright (c) 2009 unwwwired.net, released under the MIT license