public
Description: my random ruby scripts
Homepage:
Clone URL: git://github.com/kastner/ruby-junk.git
Click here to lend your support to: ruby-junk and make a donation at www.pledgie.com !
ruby-junk / prawnd.rb
100755 19 lines (16 sloc) 0.5 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$:.unshift '../prawn/lib'
require 'prawn'
 
Prawn::Document.generate("/tmp/bid.pdf") do
  # font "#{Prawn::BASEDIR}/data/fonts/Helvetica.ttf"
  image "/Users/kastner/Documents/metaatem-logo.png", :at => [0, 740], :height => 50
  
  bounding_box [400, 730], :width => 140 do
    text "Erik Kastner"
    text "kastner@metaatem.net"
    text "Meta | ateM"
    stroke do
      line bounds.top_left, bounds.top_right
      line bounds.bottom_left, bounds.bottom_right
    end
  end
end
 
`open /tmp/bid.pdf`