PDF::Writer:PDF::SimpleTable#orientation, #orientation=
require 'pdf/simpletable' pdf = PDF::Writer.new def table(pdf, orientation) PDF::SimpleTable.new do |tab| tab.column_order = %w(col1 col2 col3) p tab.orientation tab.orientation = orientation tab.show_lines = :all data = [ { "col1" => "foo", "col2" => "bar", "col3" => "baz" }, ] tab.data.replace data tab.render_on(pdf) end end [:left, :right, :center, 35, -35].each do |orientation| table(pdf, orientation) end pdf.save_as("2008041300.pdf")
で、
:center :center :center :center :center