-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolves #403 advance table to next page if rowspan in first row does…
… not fit in space remaining on current page
- Loading branch information
1 parent
4c03f53
commit 1ed9a89
Showing
4 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'prawn/table' | ||
|
||
Prawn::Table.prepend (Module.new do | ||
def initial_row_on_initial_page | ||
return 0 if fits_on_page? @pdf.bounds.height | ||
height_required = (row (0..number_of_header_rows)).height_with_span | ||
return -1 if fits_on_page? height_required, true | ||
@pdf.bounds.move_past_bottom | ||
0 | ||
end | ||
end) | ||
|
||
require_relative 'prawn-table/cell' | ||
require_relative 'prawn-table/cell/asciidoc' | ||
require_relative 'prawn-table/cell/text' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters