TX Text Control .NET Server

GetSupportedPaperSizes Method

Method|Introduced in 24.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll

Description

Gets an array of PaperSize structures specifying the names and the size of all currently supported paper sizes. These paper sizes depend on the formatting device set with the ServerTextControl.FormattingPrinter property. The method returns null, if the ServerTextControl has not been completely initialized.

Syntax

public PaperSize[] GetSupportedPaperSizes();

Examples

The following example retrieves supported paper sizes from the server text control.

PaperSize[] results = textControl.GetSupportedPaperSizes();
foreach (PaperSize paperSize in results)
{
    Console.WriteLine(paperSize);
}