Package com.evopdf
Class PdfMargins
java.lang.Object
com.evopdf.PdfMargins
This class represents the dimensions of the margins of a PDF page
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInitializes all margins with 0PdfMargins
(float all) Initializes all margins with the same valuePdfMargins
(float left, float right, float top, float bottom) Initializes the margins with the given values -
Method Summary
Modifier and TypeMethodDescriptionfloat
bottom()
Gets the bottom margin in pointsfloat
left()
Gets the left margin in pointsfloat
right()
Gets the right margin in pointsvoid
setBottom
(float bottom) Sets the bottom margin in pointsvoid
setLeft
(float left) Sets the left margin in pointsvoid
setRight
(float right) Sets the right margin in pointsvoid
setTop
(float top) Sets the top margin in pointsfloat
top()
Gets the top margin in points
-
Field Details
-
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 marginright
- the right margintop
- the top marginbottom
- 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
-