TX Text Control .NET for Windows Forms

AllowPrinting Property

Property|Introduced in 25.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets a value specifying whether the document can be printed. The default setting of this property is true.

Syntax

public bool AllowPrinting { get; set; }

Examples

The following example configures document permissions for the current document by using DocumentPermissions.AllowPrinting.

DocumentPermissions documentPermissions = textControl.DocumentPermissions;

documentPermissions.AllowPrinting = true;
if (documentPermissions.AllowPrinting)
{
    Console.WriteLine("Document Permissions: Allow Printing is enabled.");
}

documentPermissions.ReadOnly = true;
documentPermissions.AllowPrinting = true;