Table of Contents

Method SetSize

Namespace
Alternet.Drawing.Printing
Assembly
Alternet.UI.Common.dll

SetSize(KnownPaperKind, SizeD, Func<SizeD, SizeD>?)

Sets the size for the specified known paper kind.

public virtual void SetSize(KnownPaperKind kind, SizeD size, Func<SizeD, SizeD>? transform = null)

Parameters

kind KnownPaperKind

The paper type for which to assign a new size. Must be a valid value from the KnownPaperKind enumeration.

size SizeD

The dimensions to assign to the specified paper kind. Represents the width and height in device-independent units.

transform Func<SizeD, SizeD>

An optional function to transform the size before assignment. If provided, this function will be applied to the size before setting it.

Remarks

Use this method to customize the dimensions of predefined paper types at runtime. Ensure that the provided size is appropriate for the intended paper kind.

Exceptions

ArgumentOutOfRangeException

Thrown if the specified kind is not a valid value in the KnownPaperKind enumeration.