Method SetSize
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
kindKnownPaperKindThe paper type for which to assign a new size. Must be a valid value from the KnownPaperKind enumeration.
sizeSizeDThe dimensions to assign to the specified paper kind. Represents the width and height in device-independent units.
transformFunc<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.