DynamicPDF by ceTe Software

com.cete.dynamicpdf
Class AutoPageDimensions

java.lang.Object
  extended by com.cete.dynamicpdf.AreaDimensions
      extended by com.cete.dynamicpdf.PageDimensions
          extended by com.cete.dynamicpdf.AutoPageDimensions

public class AutoPageDimensions
extends PageDimensions

Represents the dimensions of a page. 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.


Constructor Summary
AutoPageDimensions(Dimensions mediaBox, Dimensions cropBox, Dimensions trimBox, Dimensions bleedBox, Dimensions artBox)
          This constructor is meant for DynamicPDF's internal usage and not supposed to be used by the client programs.
AutoPageDimensions(float width, float height)
          Initializes a new instance of the AutoPageDimensions class.
AutoPageDimensions(float width, float height, float margins)
          Initializes a new instance of the AutoPageDimensions class.
AutoPageDimensions(PageSize size)
          Initializes a new instance of the AutoPageDimensions class.
AutoPageDimensions(PageSize size, float margins)
          Initializes a new instance of the AutoPageDimensions class.
AutoPageDimensions(PageSize size, PageOrientation orientation)
          Initializes a new instance of the AutoPageDimensions class.
AutoPageDimensions(PageSize size, PageOrientation orientation, float margins)
          Initializes a new instance of the AutoPageDimensions class.
 
Method Summary
 void draw(DocumentWriter writer)
          Draws the page dimensions to the given DocumentWriter object.
 InheritableDimensions getArtBox()
          Gets the art box dimensions of the page in points (1/72 inches).
 InheritableDimensions getBleedBox()
          Gets the bleed box dimensions of the page in points (1/72 inches).
 InheritableDimensions getCropBox()
          Gets the crop box dimensions of the page in points (1/72 inches).
 float getHeight()
          Gets the height of the page dimensions in points (1/72 inches).
 Dimensions getMediaBox()
          Gets the media box dimensions of the page in points (1/72 inches).
 float getPdfX(float x)
          Gets the translated X coordinate.
 float getPdfX(float x, RelativeTo relativeTo, boolean ignoreMargins)
          Gets the translated X coordinate.
 float getPdfY(float y)
          Gets the translated Y coordinate.
 float getPdfY(float y, RelativeTo relativeTo, boolean ignoreMargins)
          Gets the translated Y coordinate.
 InheritableDimensions getTrimBox()
          Gets the trim box dimensions of the page in points (1/72 inches).
 float getWidth()
          Gets the width of the page dimensions in points (1/72 inches).
 void setHeight(float value)
          Sets the height of the page dimensions in points (1/72 inches).
 void setWidth(float value)
          Sets the width of the page dimensions in points (1/72 inches).
 
Methods inherited from class com.cete.dynamicpdf.PageDimensions
setMargins, setMargins, setMargins
 
Methods inherited from class com.cete.dynamicpdf.AreaDimensions
getBody, getBottomMargin, getEdge, getLeftMargin, getRightMargin, getTopMargin, setBottomMargin, setLeftMargin, setRightMargin, setTopMargin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoPageDimensions

public AutoPageDimensions(PageSize size)
Initializes a new instance of the AutoPageDimensions class.

Parameters:
size - Page size of the page dimensions in points (1/72 inches).

AutoPageDimensions

public AutoPageDimensions(PageSize size,
                          PageOrientation orientation)
Initializes a new instance of the AutoPageDimensions class.

Parameters:
size - Page size of the page dimensions in points (1/72 inches).
orientation - The PageOrientation of the page.

AutoPageDimensions

public AutoPageDimensions(PageSize size,
                          float margins)
Initializes a new instance of the AutoPageDimensions class.

Parameters:
size - Page size of the page dimensions in points (1/72 inches).
margins - Margins of the page dimensions in points (1/72 inches).

AutoPageDimensions

public AutoPageDimensions(PageSize size,
                          PageOrientation orientation,
                          float margins)
Initializes a new instance of the AutoPageDimensions class.

Parameters:
size - Page size of the page dimensions in points (1/72 inches).
orientation - Orientation of the page dimensions in points (1/72 inches).
margins - Margins of the page dimensions in points (1/72 inches).

AutoPageDimensions

public AutoPageDimensions(float width,
                          float height)
Initializes a new instance of the AutoPageDimensions class.

Parameters:
width - Width of the page dimensions in points (1/72 inches).
height - Height of the page dimensions in points (1/72 inches).

AutoPageDimensions

public AutoPageDimensions(float width,
                          float height,
                          float margins)
Initializes a new instance of the AutoPageDimensions class.

Parameters:
width - Width of the page dimensions in points (1/72 inches).
height - Height of the page dimensions in points (1/72 inches).
margins - Margins of the page dimensions in points (1/72 inches).

AutoPageDimensions

public AutoPageDimensions(Dimensions mediaBox,
                          Dimensions cropBox,
                          Dimensions trimBox,
                          Dimensions bleedBox,
                          Dimensions artBox)

This constructor is meant for DynamicPDF's internal usage and not supposed to be used by the client programs.

Method Detail

getMediaBox

public Dimensions getMediaBox()
Gets the media box dimensions of the page in points (1/72 inches).

Overrides:
getMediaBox in class PageDimensions
Returns:
media box dimensions of the page in points (1/72 inches).

getCropBox

public InheritableDimensions getCropBox()
Gets the crop box dimensions of the page in points (1/72 inches).

Overrides:
getCropBox in class PageDimensions
Returns:
crop box dimensions of the page in points (1/72 inches).

getBleedBox

public InheritableDimensions getBleedBox()
Gets the bleed box dimensions of the page in points (1/72 inches).

Overrides:
getBleedBox in class PageDimensions
Returns:
bleed box dimensions of the page in points (1/72 inches).

getTrimBox

public InheritableDimensions getTrimBox()
Gets the trim box dimensions of the page in points (1/72 inches).

Overrides:
getTrimBox in class PageDimensions
Returns:
trim box dimensions of the page in points (1/72 inches).

getArtBox

public InheritableDimensions getArtBox()
Gets the art box dimensions of the page in points (1/72 inches).

Overrides:
getArtBox in class PageDimensions
Returns:
art box dimensions of the page in points (1/72 inches).

getWidth

public float getWidth()
Gets the width of the page dimensions in points (1/72 inches).

Overrides:
getWidth in class AreaDimensions
Returns:
width of the page dimensions in points (1/72 inches).

setWidth

public void setWidth(float value)
Sets the width of the page dimensions in points (1/72 inches).

Overrides:
setWidth in class AreaDimensions
Parameters:
value - width of the page dimensions in points (1/72 inches).

getHeight

public float getHeight()
Gets the height of the page dimensions in points (1/72 inches).

Overrides:
getHeight in class AreaDimensions
Returns:
height of the page dimensions in points (1/72 inches).

setHeight

public void setHeight(float value)
Sets the height of the page dimensions in points (1/72 inches).

Overrides:
setHeight in class AreaDimensions
Parameters:
value - height of the page dimensions in points (1/72 inches).

draw

public void draw(DocumentWriter writer)
Draws the page dimensions to the given DocumentWriter object.

Overrides:
draw in class PageDimensions
Parameters:
writer - DocumentWriter to receive the page dimensions output.
See Also:
DocumentWriter

getPdfX

public float getPdfX(float x)
Gets the translated X coordinate.

Overrides:
getPdfX in class AreaDimensions
Parameters:
x - X coordinate to translate.
Returns:
A translated X coordinate.

getPdfX

public float getPdfX(float x,
                     RelativeTo relativeTo,
                     boolean ignoreMargins)
Gets the translated X coordinate.

Overrides:
getPdfX in class AreaDimensions
Parameters:
x - X coordinate to translate.
relativeTo - Placement of the page element on the page.
ignoreMargins - Setting false will consider the margin while placing the page element based on the RelativeTo property.
Returns:
A translated X coordinate.

getPdfY

public float getPdfY(float y)
Gets the translated Y coordinate.

Overrides:
getPdfY in class PageDimensions
Parameters:
y - Y coordinate to translate.
Returns:
A translated Y coordinate.

getPdfY

public float getPdfY(float y,
                     RelativeTo relativeTo,
                     boolean ignoreMargins)
Gets the translated Y coordinate.

Overrides:
getPdfY in class PageDimensions
Parameters:
y - Y coordinate to translate.
relativeTo - Placement of the page element on the page.
ignoreMargins - Setting false will consider the margin while placing the page element based on the RelativeTo property.
Returns:
A translated Y coordinate.

DynamicPDF by ceTe Software

API Reference for DynamicPDF v11.02 for Java generated on Sep 02, 2021
© Copyright 2021, ceTe Software