Sha256: 41b8478db53caf118c28e742f5cf9695412a8f51d0a8c3505c639402ad933cb8
Contents?: true
Size: 697 Bytes
Versions: 5
Compression:
Stored size: 697 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. # $LOAD_PATH.unshift(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
5 entries across 5 versions & 2 rubygems