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

ConstructorDescription
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

MethodDescription
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:

ParameterTypeDescription
leftMarginContentsResizeValueLeft margin value.
contentsWidthContentsResizeValueContents width.
rightMarginContentsResizeValueRight margin.
topMarginContentsResizeValueTop margin.
contentsHeightContentsResizeValueContents height.
bottomMarginContentsResizeValueBottom 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:

ParameterTypeDescription
valueContentsResizeValueContentsResizeValue 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:

ParameterTypeDescription
valueContentsResizeValueContentsResizeValue 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:

ParameterTypeDescription
valueContentsResizeValueContentsResizeValue 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:

ParameterTypeDescription
valueContentsResizeValueContentsResizeValue 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:

ParameterTypeDescription
valueContentsResizeValueContentsResizeValue 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:

ParameterTypeDescription
valueContentsResizeValueContentsResizeValue 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:

ParameterTypeDescription
leftdoubleLeft margin.
rightdoubleRight margin.
topdoubleTop margin.
bottomdoubleBottom 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:

ParameterTypeDescription
leftdoubleLeft margin (in percents of page width).
rightdoubleRight margin (in percents of page height).
topdoubleTop margin (in percents of page height).
bottomdoubleBottom 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:

ParameterTypeDescription
widthdoubleNew width of contents.
heightdoubleNew 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:

ParameterTypeDescription
widthdoubleNew content width in percents.
heightdoubleNew 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:

ParameterTypeDescription
widthdoubleNew page width in units.
heightdoubleNew 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:

ParameterTypeDescription
widthPctdoubleNew page width in percents.
heightPctdoubleNew page height in percents.

Returns: ContentsResizeParameters - New resize paramteres.