Method: RBPDF#SetAutoPageBreak

Defined in:
lib/rbpdf.rb

#SetAutoPageBreak(auto, margin = 0) ⇒ Object Also known as: set_auto_page_break

Enables or disables the automatic page breaking mode. When enabling, the second parameter is the distance from the bottom of the page that defines the triggering limit. By default, the mode is on and the margin is 2 cm.

@param boolean :auto

Boolean indicating if mode should be on or off.

@param float :margin

Distance from the bottom of the page.

@access public
@since 1.0
@see

Cell(), MultiCell(), AcceptPageBreak()



1359
1360
1361
1362
1363
1364
# File 'lib/rbpdf.rb', line 1359

def SetAutoPageBreak(auto, margin=0)
  #Set auto page break mode and triggering margin
  @auto_page_break = auto
  @b_margin = margin
  @page_break_trigger = @h - margin
end