DocumentAccessPermissions Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
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; }Public Property DocumentAccessPermissions As DocumentAccessPermissionsMembers
| Value | Description |
|---|---|
| None | Allows none of the possible permissions. |
| AllowAll | Allows all of the possible permissions. |
| AllowAuthoring | Allows authoring comments and fill in interactive form fields (including signature fields). |
| AllowAuthoringFields | Fill-in existing interactive form fields (including signature fields) is allowed. |
| AllowContentAccessibility | Allows content access for the visually impaired only. |
| AllowDocumentAssembly | Allows to assemble the document (insert, rotate or delete pages and create bookmarks or thumbnails). |
| AllowExtractContents | Copying or otherwise extracting text and/or graphics is allowed. |
| AllowGeneralEditing | Allows modifying the document's contents. |
| AllowHighLevelPrinting | Printing the document is fully allowed. |
| AllowLowLevelPrinting | Printing 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);textControl.Text = "Quarterly results"
Dim saveSettings As New SaveSettings()
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.