Click or drag to resize

PaperSizeExtensions.SetPaperSize<TPrintSettings> Method

Sets the paper size for printing.

Namespace:  DotNetBrowser.Print.Settings
Assembly:  DotNetBrowser (in DotNetBrowser.dll) Version: 2.18.0
Syntax
C#
public static TPrintSettings SetPaperSize<TPrintSettings>(
	this IPaperSize<TPrintSettings> obj,
	PaperSize paperSize
)
where TPrintSettings : class, IPrintSettings

Parameters

obj
Type: DotNetBrowser.Print.Settings.IPaperSize<TPrintSettings>
The IPaperSize<TPrintSettings> implementation.
paperSize
Type: DotNetBrowser.Print.PaperSize
The paper size used for printing.

Type Parameters

TPrintSettings
The specific print settings type.

Return Value

Type: TPrintSettings
The current print settings instance.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IPaperSize<TPrintSettings>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentExceptionThe specified paper size is null.
ArgumentExceptionThe specified paper size is not supported by the printer.
See Also