# encoding: utf-8
#
# The borders
option accepts an array with the border sides that
# will be drawn. The default is [:top, :bottom, :left, :right]
.
#
# border_width
may be set with a numeric value.
#
# Both border_color
and background_color
accept an
# HTML like RGB color string ("FF0000")
#
require File.expand_path(File.join(File.dirname(__FILE__),
%w[.. example_helper]))
filename = File.basename(__FILE__).gsub('.rb', '.pdf')
Prawn::ManualBuilder::Example.generate(filename) do
data = [ ["Look at how the cells will look when styled", "", ""],
["They probably won't look the same", "", ""]
]
{ :borders => [:top, :left],
:border_width => 3,
:border_color => "FF0000"}.each do |property, value|
text "Cell #{property}: #{value.inspect}"
table(data, :cell_style => {property => value})
move_down 20
end
text "Cell background_color: FFFFCC"
table(data, :cell_style => {:background_color => "FFFFCC"})
end