sandal/prawn — Issue #315: Row height in tables is not properly calculated
Author: benfyvie
Created: 2012-01-05 23:43:32+00:00
State: open

I have verified this issues in version 0.12.0 and 1.0.0.rc1

```ruby
require 'prawn'

Prawn::Document.generate "row_height_bug_#{Prawn::VERSION.gsub('.','_')}.pdf" do |pdf|
pdf.text("Generated using Prawn version #{Prawn::VERSION}")

pdf.text("\nRow height seems to be calculated properly if you specify padding for an entire table; however, when you specify padding on an individual row the row height is not properly calculated. Here is what I'm talking about:")

pdf.text("\nCorrect:")

title_cell = pdf.make_cell("No rows are padded")
content_cell = pdf.make_cell("I have a quick and easy question for you. Can you see the question mark ?")
table = pdf.make_table([[title_cell],[content_cell]], :column_widths => 410)
table.draw

pdf.text("\nCorrect:")

title_cell = pdf.make_cell("All rows are left padded 10px via the :cell_style option in #make_table")
content_cell = pdf.make_cell("I have a quick and easy question for you. Can you see the question mark ?")
table = pdf.make_table([[title_cell],[content_cell]], :column_widths => 410, :cell_style => {:padding_left => 10})
table.draw

pdf.text("\nBUG:")

title_cell = pdf.make_cell("Row 1 is left padded 10px via table.rows(1).padding_left = 10")
content_cell = pdf.make_cell("I have a quick and easy question for you. Can you see the question mark ?")
table = pdf.make_table([[title_cell],[content_cell]], :column_widths => 410)
table.rows(1).padding_left = 10
table.draw

end
```