Method: TCPDF#SetMargins
- Defined in:
- lib/tcpdf.rb
#SetMargins(left, top, right = -1,, keepmargins = false) ⇒ Object Also known as: set_margins
Defines the left, top and right margins.
- @param float :left
-
Left margin.
- @param float :top
-
Top margin.
- @param float :right
-
Right margin. Default value is the left one.
- @param boolean :keepmargins
-
if true overwrites the default page margins
- @access public
- @since 1.0
- @see
-
SetLeftMargin(), SetTopMargin(), SetRightMargin(), SetAutoPageBreak()
1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 |
# File 'lib/tcpdf.rb', line 1191 def SetMargins(left, top, right=-1, keepmargins=false) #Set left, top and right margins @l_margin = left @t_margin = top if (right == -1) right = left end @r_margin = right if keepmargins # overwrite original values @original_l_margin = @l_margin @original_r_margin = @r_margin end end |