Skip to content
This repository was archived by the owner on May 16, 2021. It is now read-only.

Latest commit

 

History

History
31 lines (20 loc) · 588 Bytes

File metadata and controls

31 lines (20 loc) · 588 Bytes

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

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

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

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

__END__
Author
  1. Brent Faulkner <brentf@unwwwired.net>

License

Copyright © 2009 unwwwired.net, released under the MIT license