Module: Prawn::Text::Formatted::ProtectBottomGutter

Defined in:
lib/asciidoctor/pdf/ext/prawn/formatted_text/protect_bottom_gutter.rb

Instance Method Summary collapse

Instance Method Details

#enough_height_for_this_line?Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/asciidoctor/pdf/ext/prawn/formatted_text/protect_bottom_gutter.rb', line 4

def enough_height_for_this_line?
  if @arranger.finished? && @arranger.fragments.none? {|it| it.format_state[:full_height] }
    begin
      @height -= @bottom_gutter
      super
    ensure
      @height += @bottom_gutter
    end
  else
    super
  end
end