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
| Name | Type | Access | Description |
|---|---|---|---|
LeftMargin | ContentsResizeValue? | Read/Write | Left margin, or Auto for engine-derived. |
ContentsWidth | ContentsResizeValue? | Read/Write | Content width, or Auto for engine-derived. |
RightMargin | ContentsResizeValue? | Read/Write | Right margin, or Auto for engine-derived. |
TopMargin | ContentsResizeValue? | Read/Write | Top margin, or Auto for engine-derived. |
ContentsHeight | ContentsResizeValue? | Read/Write | Content height, or Auto for engine-derived. |
BottomMargin | ContentsResizeValue? | Read/Write | Bottom margin, or Auto for engine-derived. |
ChangeMediaBox | bool | Read/Write | Whether the page media box should be resized along with the content. |
Methods
| Signature | Description |
|---|---|
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. |