PdfFileEditor.ContentsResizeParameters

PdfFileEditor.ContentsResizeParameters class

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.

public class ContentsResizeParameters

Constructors

Name Description
ContentsResizeParameters() Creates resize parameters where al values are set to “auto”. Later margins and contents size may be specified if required.
ContentsResizeParameters(ContentsResizeValue, ContentsResizeValue, ContentsResizeValue, ContentsResizeValue, ContentsResizeValue, ContentsResizeValue) Creates resize parameters with specified margin values and contents size.

Properties

Name Description
BottomMargin { get; set; } Gets or sets bottom margin on the resultant page.
ContentsHeight { get; set; } Gets or sets height of the content of the source page on the resultant page.
ContentsWidth { get; set; } Gets or sets width of the content of the source page on the resultant page.
LeftMargin { get; set; } Gets or sets left margin on the resultant page.
RightMargin { get; set; } Gets or sets right margin on the resultant page.
TopMargin { get; set; } Gets or sets top margin on the resultant page.

Methods

Name Description
static ContentSize(double, double) Creates resize parameters with specified contents size.
static ContentSizePercent(double, double) Creates resize parameters with specified contents size in percents of initial page size. Margins are caculated automatically.
static Margins(double, double, double, double) Creates resize parameters with specifed margins value. Contents size is automatically calculated.
static MarginsPercent(double, double, double, double) Creates resize parameters. Margins are specified in percents of initial page size.
static PageResize(double, double) Creates resize paramters for page resize.
static PageResizePct(double, double) Creates resize paramters for page resize. New sizes are specified in percent.

See Also