TX Text Control .NET for WPF

DocumentAccessPermissions Property

Property|Introduced in 11.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 opened. This property has only an effect if also a password has been specified with the SaveSettings.MasterPassword property. If no password has been specified 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 the current document is exported to WordprocessingML by using SaveSettings.DocumentAccessPermissions.

textControl.Text = "Quarterly results";
SaveSettings saveSettings = new();

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

textControl.Save("quarterly-results.docx", StreamType.WordprocessingML, saveSettings);

Limitations

PDF only.

Further Reading