IPdfFileEditor.ContentsResizeParameters
Inheritance: java.lang.Object
public static class IPdfFileEditor.ContentsResizeParameters
Class for specifing page resize parameters. Allow to set the following parameters: Size of result page (width, height) in default space units or in percents of initial pages size; Left, Top, Bottom and Right margins in default space units or in percents of initial page size; Some values may be left null for automatic calculation. These values will be calculated from rest of page size after calculation explicitly specified values. For example: if page width = 100 and new page width specified 60 units then left and right margins are automatically calculated: (100 - 60) / 2 = 15. This class is used in ResizeContents method.
Constructors
Constructor | Description |
---|---|
ContentsResizeParameters() | Creates resize parameters where al values are set to “auto”. |
ContentsResizeParameters(IPdfFileEditor.ContentsResizeValue leftMargin, IPdfFileEditor.ContentsResizeValue contentsWidth, IPdfFileEditor.ContentsResizeValue rightMargin, IPdfFileEditor.ContentsResizeValue topMargin, IPdfFileEditor.ContentsResizeValue contentsHeight, IPdfFileEditor.ContentsResizeValue bottomMargin) | Creates resize parameters with specified margin values and contents size. |
Methods
Method | Description |
---|---|
getLeftMargin() | Gets or sets left margin on the resultant page. |
setLeftMargin(IPdfFileEditor.ContentsResizeValue value) | Gets or sets left margin on the resultant page. |
getRightMargin() | Gets or sets right margin on the resultant page. |
setRightMargin(IPdfFileEditor.ContentsResizeValue value) | Gets or sets right margin on the resultant page. |
getTopMargin() | Gets or sets top margin on the resultant page. |
setTopMargin(IPdfFileEditor.ContentsResizeValue value) | Gets or sets top margin on the resultant page. |
getBottomMargin() | Gets or sets bottom margin on the resultant page. |
setBottomMargin(IPdfFileEditor.ContentsResizeValue value) | Gets or sets bottom margin on the resultant page. |
getContentsWidth() | Gets or sets width of the content of the source page on the resultant page. |
setContentsWidth(IPdfFileEditor.ContentsResizeValue value) | Gets or sets width of the content of the source page on the resultant page. |
getContentsHeight() | Gets or sets height of the content of the source page on the resultant page. |
setContentsHeight(IPdfFileEditor.ContentsResizeValue value) | Gets or sets height of the content of the source page on the resultant page. |
margins(double left, double right, double top, double bottom) | Creates resize parameters with specifed margins value. |
marginsPercent(double left, double right, double top, double bottom) | Creates resize parameters. |
contentSize(double width, double height) | Creates resize parameters with specified contents size. |
contentSizePercent(double width, double height) | Creates resize parameters with specified conets size in percents of initial page size. |
pageResize(double width, double height) | Creates resize paramters for page resize. |
pageResizePct(double widthPct, double heightPct) | Creates resize paramters for page resize. |
ContentsResizeParameters()
public ContentsResizeParameters()
Creates resize parameters where al values are set to “auto”. Later margins and contents size may be specified if required.
ContentsResizeParameters(IPdfFileEditor.ContentsResizeValue leftMargin, IPdfFileEditor.ContentsResizeValue contentsWidth, IPdfFileEditor.ContentsResizeValue rightMargin, IPdfFileEditor.ContentsResizeValue topMargin, IPdfFileEditor.ContentsResizeValue contentsHeight, IPdfFileEditor.ContentsResizeValue bottomMargin)
public ContentsResizeParameters(IPdfFileEditor.ContentsResizeValue leftMargin, IPdfFileEditor.ContentsResizeValue contentsWidth, IPdfFileEditor.ContentsResizeValue rightMargin, IPdfFileEditor.ContentsResizeValue topMargin, IPdfFileEditor.ContentsResizeValue contentsHeight, IPdfFileEditor.ContentsResizeValue bottomMargin)
Creates resize parameters with specified margin values and contents size.
Parameters:
Parameter | Type | Description |
---|---|---|
leftMargin | ContentsResizeValue | Left margin value. |
contentsWidth | ContentsResizeValue | Contents width. |
rightMargin | ContentsResizeValue | Right margin. |
topMargin | ContentsResizeValue | Top margin. |
contentsHeight | ContentsResizeValue | Contents height. |
bottomMargin | ContentsResizeValue | Bottom margin. |
getLeftMargin()
public IPdfFileEditor.ContentsResizeValue getLeftMargin()
Gets or sets left margin on the resultant page.
Returns: ContentsResizeValue - ContentsResizeValue object
setLeftMargin(IPdfFileEditor.ContentsResizeValue value)
public void setLeftMargin(IPdfFileEditor.ContentsResizeValue value)
Gets or sets left margin on the resultant page.
Parameters:
Parameter | Type | Description |
---|---|---|
value | ContentsResizeValue | ContentsResizeValue object |
getRightMargin()
public IPdfFileEditor.ContentsResizeValue getRightMargin()
Gets or sets right margin on the resultant page.
Returns: ContentsResizeValue - ContentsResizeValue object
setRightMargin(IPdfFileEditor.ContentsResizeValue value)
public void setRightMargin(IPdfFileEditor.ContentsResizeValue value)
Gets or sets right margin on the resultant page.
Parameters:
Parameter | Type | Description |
---|---|---|
value | ContentsResizeValue | ContentsResizeValue object |
getTopMargin()
public IPdfFileEditor.ContentsResizeValue getTopMargin()
Gets or sets top margin on the resultant page.
Returns: ContentsResizeValue - ContentsResizeValue object
setTopMargin(IPdfFileEditor.ContentsResizeValue value)
public void setTopMargin(IPdfFileEditor.ContentsResizeValue value)
Gets or sets top margin on the resultant page.
Parameters:
Parameter | Type | Description |
---|---|---|
value | ContentsResizeValue | ContentsResizeValue object |
getBottomMargin()
public IPdfFileEditor.ContentsResizeValue getBottomMargin()
Gets or sets bottom margin on the resultant page.
Returns: ContentsResizeValue - ContentsResizeValue object
setBottomMargin(IPdfFileEditor.ContentsResizeValue value)
public void setBottomMargin(IPdfFileEditor.ContentsResizeValue value)
Gets or sets bottom margin on the resultant page.
Parameters:
Parameter | Type | Description |
---|---|---|
value | ContentsResizeValue | ContentsResizeValue object |
getContentsWidth()
public IPdfFileEditor.ContentsResizeValue getContentsWidth()
Gets or sets width of the content of the source page on the resultant page.
Returns: ContentsResizeValue - ContentsResizeValue object
setContentsWidth(IPdfFileEditor.ContentsResizeValue value)
public void setContentsWidth(IPdfFileEditor.ContentsResizeValue value)
Gets or sets width of the content of the source page on the resultant page.
Parameters:
Parameter | Type | Description |
---|---|---|
value | ContentsResizeValue | ContentsResizeValue object |
getContentsHeight()
public IPdfFileEditor.ContentsResizeValue getContentsHeight()
Gets or sets height of the content of the source page on the resultant page.
Returns: ContentsResizeValue - ContentsResizeValue object
setContentsHeight(IPdfFileEditor.ContentsResizeValue value)
public void setContentsHeight(IPdfFileEditor.ContentsResizeValue value)
Gets or sets height of the content of the source page on the resultant page.
Parameters:
Parameter | Type | Description |
---|---|---|
value | ContentsResizeValue | ContentsResizeValue object |
margins(double left, double right, double top, double bottom)
public static IPdfFileEditor.ContentsResizeParameters margins(double left, double right, double top, double bottom)
Creates resize parameters with specifed margins value. Contents size is automatically calculated.
Parameters:
Parameter | Type | Description |
---|---|---|
left | double | Left margin. |
right | double | Right margin. |
top | double | Top margin. |
bottom | double | Bottom margin. |
Returns: ContentsResizeParameters - Created resize parameters.
marginsPercent(double left, double right, double top, double bottom)
public static IPdfFileEditor.ContentsResizeParameters marginsPercent(double left, double right, double top, double bottom)
Creates resize parameters. Margins are specified in percents of initial page size.
Parameters:
Parameter | Type | Description |
---|---|---|
left | double | Left margin (in percents of page width). |
right | double | Right margin (in percents of page height). |
top | double | Top margin (in percents of page height). |
bottom | double | Bottom margin (in percents of page height). |
Returns: ContentsResizeParameters - Returns new resize parameters.
contentSize(double width, double height)
public static IPdfFileEditor.ContentsResizeParameters contentSize(double width, double height)
Creates resize parameters with specified contents size.
Parameters:
Parameter | Type | Description |
---|---|---|
width | double | New width of contents. |
height | double | New height of contetns. |
Returns: ContentsResizeParameters - Returns new resize parameters.
contentSizePercent(double width, double height)
public static IPdfFileEditor.ContentsResizeParameters contentSizePercent(double width, double height)
Creates resize parameters with specified conets size in percents of initial page size. Margins are caculated automatically.
Parameters:
Parameter | Type | Description |
---|---|---|
width | double | New content width in percents. |
height | double | New contents height in percents. |
Returns: ContentsResizeParameters - New resize parameters.
pageResize(double width, double height)
public static IPdfFileEditor.ContentsResizeParameters pageResize(double width, double height)
Creates resize paramters for page resize.
Parameters:
Parameter | Type | Description |
---|---|---|
width | double | New page width in units. |
height | double | New page height in units. |
Returns: ContentsResizeParameters - New resize paramteres.
pageResizePct(double widthPct, double heightPct)
public IPdfFileEditor.ContentsResizeParameters pageResizePct(double widthPct, double heightPct)
Creates resize paramters for page resize. New sizes are specified in percent.
Parameters:
Parameter | Type | Description |
---|---|---|
widthPct | double | New page width in percents. |
heightPct | double | New page height in percents. |
Returns: ContentsResizeParameters - New resize paramteres.