WriteProtection
Overview
WriteProtection is a class in Aspose.Words FOSS for .NET.
Specifies write protection settings for a document.
This class provides 2 methods for working with WriteProtection objects in .NET programs.
Available methods include: SetPassword, ValidatePassword.
All public members are accessible to any .NET application after installing the Aspose.Words FOSS for .NET package.
Properties: IsWriteProtected, ReadOnlyRecommended.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
ReadOnlyRecommended | bool | Read/Write | Specifies whether the document author has recommended that the document be opened as read-only. |
IsWriteProtected | bool | Read | Returns true when a write protection password is set. |
Methods
| Signature | Description |
|---|---|
SetPassword(password: string) | Sets the write protection password for the document. |
ValidatePassword(password: string) | Returns true if the specified password is the same as the write-protection password the document was protected with. |