public static class IPdfFileEditor.ContentsResizeParameters extends Object
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.
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
static IPdfFileEditor.ContentsResizeParameters |
contentSize(double width,
double height)
Creates resize parameters with specified contents size.
|
static IPdfFileEditor.ContentsResizeParameters |
contentSizePercent(double width,
double height)
Creates resize parameters with specified conets size in percents of initial page size.
|
IPdfFileEditor.ContentsResizeValue |
getBottomMargin()
Gets or sets bottom margin on the resultant page.
|
IPdfFileEditor.ContentsResizeValue |
getContentsHeight()
Gets or sets height of the content of the source page on the resultant page.
|
IPdfFileEditor.ContentsResizeValue |
getContentsWidth()
Gets or sets width of the content of the source page on the resultant page.
|
IPdfFileEditor.ContentsResizeValue |
getLeftMargin()
Gets or sets left margin on the resultant page.
|
IPdfFileEditor.ContentsResizeValue |
getRightMargin()
Gets or sets right margin on the resultant page.
|
IPdfFileEditor.ContentsResizeValue |
getTopMargin()
Gets or sets top margin on the resultant page.
|
static IPdfFileEditor.ContentsResizeParameters |
margins(double left,
double right,
double top,
double bottom)
Creates resize parameters with specifed margins value.
|
static IPdfFileEditor.ContentsResizeParameters |
marginsPercent(double left,
double right,
double top,
double bottom)
Creates resize parameters.
|
static IPdfFileEditor.ContentsResizeParameters |
pageResize(double width,
double height)
Creates resize paramters for page resize.
|
static IPdfFileEditor.ContentsResizeParameters |
pageResizePct(double widthPct,
double heightPct)
Creates resize paramters for page resize.
|
void |
setBottomMargin(IPdfFileEditor.ContentsResizeValue value)
Gets or sets bottom margin on the resultant page.
|
void |
setContentsHeight(IPdfFileEditor.ContentsResizeValue value)
Gets or sets height of the content of the source page on the resultant page.
|
void |
setContentsWidth(IPdfFileEditor.ContentsResizeValue value)
Gets or sets width of the content of the source page on the resultant page.
|
void |
setLeftMargin(IPdfFileEditor.ContentsResizeValue value)
Gets or sets left margin on the resultant page.
|
void |
setRightMargin(IPdfFileEditor.ContentsResizeValue value)
Gets or sets right margin on the resultant page.
|
void |
setTopMargin(IPdfFileEditor.ContentsResizeValue value)
Gets or sets top margin on the resultant page.
|
public ContentsResizeParameters()
Creates resize parameters where al values are set to "auto". Later margins and contents size may be specified if required.
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.
leftMargin
- Left margin value.contentsWidth
- Contents width.rightMargin
- Right margin.topMargin
- Top margin.contentsHeight
- Contents height.bottomMargin
- Bottom margin.public IPdfFileEditor.ContentsResizeValue getLeftMargin()
Gets or sets left margin on the resultant page.
public void setLeftMargin(IPdfFileEditor.ContentsResizeValue value)
Gets or sets left margin on the resultant page.
value
- ContentsResizeValue objectpublic IPdfFileEditor.ContentsResizeValue getRightMargin()
Gets or sets right margin on the resultant page.
public void setRightMargin(IPdfFileEditor.ContentsResizeValue value)
Gets or sets right margin on the resultant page.
value
- ContentsResizeValue objectpublic IPdfFileEditor.ContentsResizeValue getTopMargin()
Gets or sets top margin on the resultant page.
public void setTopMargin(IPdfFileEditor.ContentsResizeValue value)
Gets or sets top margin on the resultant page.
value
- ContentsResizeValue objectpublic IPdfFileEditor.ContentsResizeValue getBottomMargin()
Gets or sets bottom margin on the resultant page.
public void setBottomMargin(IPdfFileEditor.ContentsResizeValue value)
Gets or sets bottom margin on the resultant page.
value
- ContentsResizeValue objectpublic IPdfFileEditor.ContentsResizeValue getContentsWidth()
Gets or sets width of the content of the source page on the resultant page.
public void setContentsWidth(IPdfFileEditor.ContentsResizeValue value)
Gets or sets width of the content of the source page on the resultant page.
value
- ContentsResizeValue objectpublic IPdfFileEditor.ContentsResizeValue getContentsHeight()
Gets or sets height of the content of the source page on the resultant page.
public void setContentsHeight(IPdfFileEditor.ContentsResizeValue value)
Gets or sets height of the content of the source page on the resultant page.
value
- ContentsResizeValue objectpublic static IPdfFileEditor.ContentsResizeParameters margins(double left, double right, double top, double bottom)
Creates resize parameters with specifed margins value. Contents size is automatically calculated.
left
- Left margin.right
- Right margin.top
- Top margin.bottom
- Bottom margin.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.
left
- Left margin (in percents of page width).right
- Right margin (in percents of page height).top
- Top margin (in percents of page height).bottom
- Bottom margin (in percents of page height).public static IPdfFileEditor.ContentsResizeParameters contentSize(double width, double height)
Creates resize parameters with specified contents size.
width
- New width of contents.height
- New height of contetns.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.
width
- New content width in percents.height
- New contents height in percents.public static IPdfFileEditor.ContentsResizeParameters pageResize(double width, double height)
Creates resize paramters for page resize.
width
- New page width in units.height
- New page height in units.public static IPdfFileEditor.ContentsResizeParameters pageResizePct(double widthPct, double heightPct)
Creates resize paramters for page resize. New sizes are specified in percent.
widthPct
- New page width in percents.heightPct
- New page height in percents.