Package com.evopdf

# Class PdfMargins

java.lang.Object
com.evopdf.PdfMargins

public class PdfMargins extends Object
This class represents the dimensions of the margins of a PDF page

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final PdfMargins`
  `EMPTY`
  Empty margins object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PdfMargins()`
  Initializes all margins with 0
  `PdfMargins(float all)`
  Initializes all margins with the same value
  `PdfMargins(float left, float right, float top, float bottom)`
  Initializes the margins with the given values

- ## Method Summary

  Modifier and Type
  Method
  Description
  `float`
  `bottom()`
  Gets the bottom margin in points
  `float`
  `left()`
  Gets the left margin in points
  `float`
  `right()`
  Gets the right margin in points
  `void`
  `setBottom(float bottom)`
  Sets the bottom margin in points
  `void`
  `setLeft(float left)`
  Sets the left margin in points
  `void`
  `setRight(float right)`
  Sets the right margin in points
  `void`
  `setTop(float top)`
  Sets the top margin in points
  `float`
  `top()`
  Gets the top margin in points

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### EMPTY

    public static final PdfMargins EMPTY
    Empty margins object

- ## Constructor Details

  - ### PdfMargins

    public PdfMargins()
    Initializes all margins with 0

  - ### PdfMargins

    public PdfMargins(float all)
    Initializes all margins with the same value
    Parameters:
      `all` - the value for all document margins

  - ### PdfMargins

    public PdfMargins(float left, float right, float top, float bottom)
    Initializes the margins with the given values
    Parameters:
      `left` - the left margin
      `right` - the right margin
      `top` - the top margin
      `bottom` - the bottom margin

- ## Method Details

  - ### left

    public float left()
    Gets the left margin in points
    Returns:
      the left margin in points

  - ### setLeft

    public void setLeft(float left)
    Sets the left margin in points
    Parameters:
      `left` - the left margin in points to set

  - ### right

    public float right()
    Gets the right margin in points
    Returns:
      the right margin in points

  - ### setRight

    public void setRight(float right)
    Sets the right margin in points
    Parameters:
      `right` - the right margin in points to set

  - ### top

    public float top()
    Gets the top margin in points
    Returns:
      the top margin in points

  - ### setTop

    public void setTop(float top)
    Sets the top margin in points
    Parameters:
      `top` - the top margin in points to set

  - ### bottom

    public float bottom()
    Gets the bottom margin in points
    Returns:
      the bottom margin in points

  - ### setBottom

    public void setBottom(float bottom)
    Sets the bottom margin in points
    Parameters:
      `bottom` - the bottom margin in points to set