Sha256: 9f03401ad0d9847ee4423dc838d4a3b366a8bf63623634b049b821b470f03099

Contents?: true

Size: 510 Bytes

Versions: 8

Compression:

Stored size: 510 Bytes

Contents

# encoding: utf-8
#
# An early example of basic text generation at absolute positions.
# Mostly kept for nostalgia.
#
require "#{File.dirname(__FILE__)}/../example_helper.rb"

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

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
prawn-core-0.7.2 examples/text/simple_text.rb
prawn-core-0.7.1 examples/text/simple_text.rb
prawn-layout-0.3.2 vendor/prawn-core/examples/text/simple_text.rb
prawn-core-0.6.3 examples/text/simple_text.rb
prawn-core-0.6.2 examples/text/simple_text.rb
prawn-layout-0.3.1 vendor/prawn-core/examples/text/simple_text.rb
prawn-core-0.6.1 examples/text/simple_text.rb
prawn-core-0.5.1 examples/text/simple_text.rb