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))
Consider a table where the first column has an index number, with multi-line text in the subsequent columns.
E.g.
The
start_new_page?
method only checks the first column in a row to see if it fits on the page... https://github.com/prawnpdf/prawn-table/blob/38b5bdb5dd95237646675c968091706f57a7a641/lib/prawn/table.rb#L424If 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.