TX Text Control .NET for WPF

DocumentAccessPermissions Property

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

Description

Specifies how a document can be accessed after it has been loaded. If a valid master password has been specified with the MasterPassword property, the document can be accessed without any restrictions. The property's value can be a bitwise combination of more than one of the described values.

Syntax

public DocumentAccessPermissions DocumentAccessPermissions { get; set; }

Members

ValueDescription
NoneAllows none of the possible permissions.
AllowAllAllows all of the possible permissions.
AllowAuthoringAllows authoring comments and fill in interactive form fields (including signature fields).
AllowAuthoringFieldsFill-in existing interactive form fields (including signature fields) is allowed.
AllowContentAccessibilityAllows content access for the visually impaired only.
AllowDocumentAssemblyAllows to assemble the document (insert, rotate or delete pages and create bookmarks or thumbnails).
AllowExtractContentsCopying or otherwise extracting text and/or graphics is allowed.
AllowGeneralEditingAllows modifying the document's contents.
AllowHighLevelPrintingPrinting the document is fully allowed.
AllowLowLevelPrintingPrinting the document is allowed (low-level).

Examples

The following example configures how a WordprocessingML template is loaded by using LoadSettings.DocumentAccessPermissions.

LoadSettings loadSettings = new();

loadSettings.DocumentAccessPermissions = DocumentAccessPermissions.AllowAuthoring;
Console.WriteLine($"Document Access Permissions used by Load Settings: {loadSettings.DocumentAccessPermissions}");

textControl.Load("template.docx", StreamType.WordprocessingML, loadSettings);

Limitations

Read only.

PDF only.

Further Reading

  • Exporting Password Protected PDF Documents –