1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# encoding: utf-8
#
# An early example of basic text generation at absolute positions.
# Mostly kept for nostalgia.
#
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
require "prawn"

Prawn::Document.generate "simple_text.pdf" do       
  fill_color "0000ff"
  text "Hello World", :at => [200,420], :size => 32, :rotate => 45
  font "Times-Roman"     
  fill_color "ff0000"
  text "Using Another Font", :at => [5,5]    
  start_new_page        
  font "Courier"       
  text "Goodbye World", :at => [288,50]     
end