# TextViewGenerator.CanDocumentFormat Property

> Informs whether the document can be formatted with page and section formatting attributes. The property's value depends on the DocumentPermissions.AllowFormatting property and the currently set edit mode.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 25.0
- **Namespace:** `TXTextControl.ServerVisualisation`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Server.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.Server.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Server.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.ServerVisualization > TextViewGenerator.CanDocumentFormat Property
- **520 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/candocumentformat-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/candocumentformat-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/candocumentformat-property/llms-full.txt

---

### Description

Informs whether the document can be formatted with page and section formatting attributes. The property's value depends on the [DocumentPermissions.AllowFormatting](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/documentpermissions/allowformatting-property/llms-full.txt) property and the currently set [edit mode](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/editmode-property/llms-full.txt).

### Syntax

```csharp
public bool CanDocumentFormat { get; }
```

```vbnet
Public ReadOnly Property CanDocumentFormat As Boolean
```

### Examples

The following example applies bold formatting through the text view generator's selection by using `TextViewGenerator.CanDocumentFormat`.

```csharp
Selection formattedSelection = textViewGenerator.Selection;
formattedSelection.Bold = true;
textViewGenerator.Selection = formattedSelection;

if (textViewGenerator.CanDocumentFormat)
{
    Console.WriteLine("Text View Generator is ready for this operation.");
}
```

```vbnet
Dim formattedSelection As Selection = textViewGenerator.Selection
formattedSelection.Bold = True
textViewGenerator.Selection = formattedSelection

If textViewGenerator.CanDocumentFormat Then
    Console.WriteLine("Text View Generator is ready for this operation.")
End If
```

### Limitations

Runtime only.

Read only.

---

## Nearby

- **Previous:** [TextViewGenerator.CanCopy Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/cancopy-property/llms-full.txt)
- **Next:** [TextViewGenerator.CanEdit Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/canedit-property/llms-full.txt)
