-
Notifications
You must be signed in to change notification settings - Fork 103
Open
Description
Consider a table where the first column has an index number, with multi-line text in the subsequent columns.
E.g.
index | title | description |
---|---|---|
1. | A short title | Some very long multi-line text.... |
The start_new_page?
method only checks the first column in a row to see if it fits on the page...
prawn-table/lib/prawn/table.rb
Line 424 in 38b5bdb
(cell.column == 0 && cell.row > 0 && |
If one of the other cells wraps to multi-line at the end of a page, a new page will not result.
Suggestion: consider removing the cell.column == 0
check so that the row will start a new page if any of the row content will not fit on the current page.
# OLD WAY - check only column 0
# (cell.column == 0 && cell.row > 0 &&
# !row(cell.row).fits_on_current_page?(offset, ref_bounds))
# NEW WAY - check all columns
(cell.row > 0 &&
!row(cell.row).fits_on_current_page?(offset, ref_bounds))
Metadata
Metadata
Assignees
Labels
No labels