Sha256: 42e9a11eb5057fb4cdf1fc4cd3c5bc9d28142547ff871ecfae5245e29f1080c9

Contents?: true

Size: 532 Bytes

Versions: 10

Compression:

Stored size: 532 Bytes

Contents

# encoding: utf-8

$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
require "prawn"

Prawn::Document.generate("alignment.pdf") do
  text "This text should be left aligned"
  text "This text should be centered", :align => :center    
  text "This text should be right aligned", :align => :right
  
  pad(20) { text "This is Flowing from the left. " * 20 }
  
  pad(20) { text "This is Flowing from the center. " * 20, :align => :center }
  
  pad(20) { text "This is Flowing from the right. " * 20, :align => :right }
end

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
fullcirclegroup-fullcirclegroup-prawn-0.2.99.2 examples/alignment.rb
fullcirclegroup-prawn-0.2.99.3 examples/alignment.rb
satoko-prawn-0.2.99.6 examples/alignment.rb
prawn-0.1.0 examples/alignment.rb
prawn-0.1.2 examples/alignment.rb
prawn-0.1.1 examples/alignment.rb
prawn-0.2.1 examples/alignment.rb
prawn-0.2.2 examples/alignment.rb
prawn-0.2.0 examples/alignment.rb
prawn-0.2.3 examples/alignment.rb