# TextControl.GetSupportedPaperSizes Method

> 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 WPF.TextControl.FormattingPrinter property.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.WPF`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.WPF.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > TextControl.GetSupportedPaperSizes Method
- **373 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/getsupportedpapersizes-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/getsupportedpapersizes-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/getsupportedpapersizes-method/llms-full.txt

---

### Description

Gets an array of [PaperSize](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/papersize/llms-full.txt) structures specifying the names and the size of all currently supported paper sizes. These paper sizes depend on the formatting device set with the [WPF.TextControl.FormattingPrinter](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/formattingprinter-property/llms-full.txt) property.

### Syntax

```csharp
public PaperSize[] GetSupportedPaperSizes();
```

```vbnet
Public Function GetSupportedPaperSizes() As PaperSize()
```

### Examples

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

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

```vbnet
Dim results As PaperSize() = textControl.GetSupportedPaperSizes()
For Each paperSize As PaperSize In results
    Console.WriteLine(paperSize)
Next
```

---

## Nearby

- **Previous:** [TextControl.GetSupportedFonts Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/getsupportedfonts-method/llms-full.txt)
- **Next:** [TextControl.GetTextFields Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/gettextfields-method/llms-full.txt)
