Sha256: 79fd42a18e1de0ff81204cff430695e249ef5b862433c5aff6f5c99c7c6de6ec
Contents?: true
Size: 727 Bytes
Versions: 2
Compression:
Stored size: 727 Bytes
Contents
# encoding: utf-8 # # This example demonstrates usage of Document#text with the :align option. # Available options are :left, :right, and :center, with :left as default. # require File.expand_path(File.join(File.dirname(__FILE__), %w[.. example_helper])) 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
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
prawn-0.11.1 | examples/text/alignment.rb |
davebenvenuti-prawn-0.11.1.pre | examples/text/alignment.rb |