|
DynamicPDF by ceTe Software | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cete.dynamicpdf.AreaDimensions com.cete.dynamicpdf.PageDimensions
public class PageDimensions
This class can be used to specify the dimensions and other formatting details of a page. It can then be passed into a Page constructor.
Licensing:
This class is a DynamicPDF Generator Community Edition feature.
Constructor Summary | |
---|---|
PageDimensions(Dimensions edgeDimensions)
Initializes a new instance of the PageDimensions class. |
|
PageDimensions(Dimensions edgeDimensions,
Dimensions marginDimensions)
Initializes a new instance of the PageDimensions class. |
|
PageDimensions(Dimensions edgeDimensions,
float margins)
Initializes a new instance of the PageDimensions class. |
|
PageDimensions(float width,
float height)
Initializes a new instance of the PageDimensions class. |
|
PageDimensions(float width,
float height,
float margins)
Initializes a new instance of the PageDimensions class. |
|
PageDimensions(PageSize size)
Initializes a new instance of the PageDimensions class. |
|
PageDimensions(PageSize size,
float margins)
Initializes a new instance of the PageDimensions class. |
|
PageDimensions(PageSize size,
PageOrientation orientation)
Initializes a new instance of the PageDimensions class. |
|
PageDimensions(PageSize size,
PageOrientation orientation,
float margins)
Initializes a new instance of the PageDimensions class. |
Method Summary | |
---|---|
void |
draw(DocumentWriter writer)
Draws the page dimensions to the given DocumentWriter object. |
float |
getPdfY(float y)
Gets the translated Y coordinate. |
void |
setMargins(float margins)
Sets all of the margins for the page dimensions. |
void |
setMargins(float leftAndRight,
float topAndBottom)
Sets all of the margins of the page. |
void |
setMargins(float leftMargin,
float topMargin,
float rightMargin,
float bottomMargin)
Sets all of the margins of the page. |
Methods inherited from class com.cete.dynamicpdf.AreaDimensions |
---|
getBody, getBottomMargin, getEdge, getHeight, getLeftMargin, getPdfX, getRightMargin, getTopMargin, getWidth, setBottomMargin, setHeight, setLeftMargin, setRightMargin, setTopMargin, setWidth |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PageDimensions(float width, float height)
PageDimensions
class.
width
- Width of the page dimensions.height
- Height of the page dimensions.PageDimensions
public PageDimensions(float width, float height, float margins)
PageDimensions
class.
width
- Width of the page dimensions.height
- Height of the page dimensions.margins
- Margins of the page dimensions.PageDimensions
public PageDimensions(PageSize size)
PageDimensions
class.
size
- Page size of the page dimensions.PageDimensions
public PageDimensions(PageSize size, PageOrientation orientation)
PageDimensions
class.
size
- Page size of the page dimensions.orientation
- Orientation of the page dimensions.PageDimensions
public PageDimensions(PageSize size, float margins)
PageDimensions
class.
size
- Page size of the page dimensions.margins
- Margins of the page dimensions.PageDimensions
public PageDimensions(PageSize size, PageOrientation orientation, float margins)
PageDimensions
class.
size
- Page size of the page dimensions.orientation
- Orientation of the page dimensions.margins
- Margins of the page dimensions.PageDimensions
public PageDimensions(Dimensions edgeDimensions)
PageDimensions
class.
edgeDimensions
- Edge dimensions of the page dimensions.PageDimensions
public PageDimensions(Dimensions edgeDimensions, float margins)
PageDimensions
class.
edgeDimensions
- Edge dimensions of the page dimensions.margins
- Margins of the page dimensions.PageDimensions
public PageDimensions(Dimensions edgeDimensions, Dimensions marginDimensions)
PageDimensions
class.
edgeDimensions
- Edge dimensions of the page dimensions.marginDimensions
- Margin dimensions of the page dimensions.PageDimensions
Method Detail |
---|
public void draw(DocumentWriter writer)
DocumentWriter
object.
java.lang.IllegalArgumentException
- Left and top edge of page must be 0.writer
- to receive the page dimensions output.DocumentWriter
public float getPdfY(float y)
getPdfY
in class AreaDimensions
y
- Y coordinate to translate.
public void setMargins(float margins)
margins
- Margins value to set.public void setMargins(float leftAndRight, float topAndBottom)
leftAndRight
- Left and right margin value to set.topAndBottom
- Top and bottom margin value to set.public void setMargins(float leftMargin, float topMargin, float rightMargin, float bottomMargin)
leftMargin
- Left margin value to set.topMargin
- Top margin value to set.rightMargin
- Right margin value to set.bottomMargin
- Bottom margin value to set.
|
DynamicPDF by ceTe Software | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |