# TextViewGenerator.CanPrint Property

> Informs whether the document can be printed. The property's value depends on the DocumentPermissions.AllowPrinting 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.CanPrint Property
- **531 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/canprint-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/canprint-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/canprint-property/llms-full.txt

---

### Description

Informs whether the document can be printed. The property's value depends on the [DocumentPermissions.AllowPrinting](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/documentpermissions/allowprinting-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 CanPrint { get; }
```

```vbnet
Public ReadOnly Property CanPrint As Boolean
```

### Examples

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

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

if (textViewGenerator.CanPrint)
{
    textViewGenerator.Print(new System.Drawing.Printing.PrintDocument());
}
```

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

If textViewGenerator.CanPrint Then
    textViewGenerator.Print(New System.Drawing.Printing.PrintDocument())
End If
```

### Limitations

Runtime only.

Read only.

---

## Nearby

- **Previous:** [TextViewGenerator.CanPaste Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/canpaste-property/llms-full.txt)
- **Next:** [TextViewGenerator.CanRedo Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/canredo-property/llms-full.txt)
