ContentsResizeParameters

ContentsResizeParameters

Overview

ContentsResizeParameters is a class in Aspose.PDF FOSS for .NET.

Parameters for ResizeContents describing margins, content size, and whether the page media box should change to match.

This class provides 8 methods for working with ContentsResizeParameters objects in .NET programs. Available methods include: ContentSize, ContentSizePercent, ContentsResizeParameters, Margins, MarginsPercent, PageResize, PageResizePct. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: BottomMargin, ChangeMediaBox, ContentsHeight, ContentsWidth, LeftMargin, RightMargin, and 1 more.

Properties

NameTypeAccessDescription
LeftMarginContentsResizeValue?Read/WriteLeft margin, or Auto for engine-derived.
ContentsWidthContentsResizeValue?Read/WriteContent width, or Auto for engine-derived.
RightMarginContentsResizeValue?Read/WriteRight margin, or Auto for engine-derived.
TopMarginContentsResizeValue?Read/WriteTop margin, or Auto for engine-derived.
ContentsHeightContentsResizeValue?Read/WriteContent height, or Auto for engine-derived.
BottomMarginContentsResizeValue?Read/WriteBottom margin, or Auto for engine-derived.
ChangeMediaBoxboolRead/WriteWhether the page media box should be resized along with the content.

Methods

SignatureDescription
ContentsResizeParameters()Initialise an empty parameter set (all values auto).
ContentsResizeParameters(leftMargin: ContentsResizeValue, contentsWidth: ContentsResizeValue, rightMargin: ContentsResizeValue, topMargin: ContentsResizeValue, contentsHeight: ContentsResizeValue, bottomMargin: ContentsResizeValue)Initialise with explicit values for every margin / content dimension.
PageResize(width: double, height: double)Resize parameters that fit page content into width×height points with zero margins.
PageResizePct(widthPct: double, heightPct: double)Resize parameters that scale page content by widthPct%×heightPct% with zero margins.
ContentSize(width: double, height: double)Resize parameters with explicit content size in points; margins auto.
ContentSizePercent(width: double, height: double)Resize parameters with explicit content size in percent of page; margins auto.
Margins(left: double, right: double, top: double, bottom: double)Resize parameters with explicit margins in points; content size auto.
MarginsPercent(left: double, right: double, top: double, bottom: double)Resize parameters with explicit margins as percent of page; content size auto.

See Also