Click or drag to resize
DocumentProtection Class
Represents a set of document protection restrictions which have been applied to the contents of a document.
Inheritance Hierarchy

Namespace: GemBox.Document
Assembly: GemBox.Document (in GemBox.Document.dll) Version:
public sealed class DocumentProtection

The DocumentProtection type exposes the following members.

Public methodSetPassword
Sets the password. If password is or empty, any existing password will be cleared.
Public methodStartEnforcingProtection
Starts enforcing protection by restricting document editing actions to those specified by editingRestriction parameter with optional password which must be specified to stop protection in consumer application such as MS Word.
Public methodStopProtection
Stops enforcing protection and clears password, if there is any.
Public methodToString
Returns a String that represents this DocumentProtection instance.
(Overrides ObjectToString.)
Public propertyEditingRestriction
Gets or sets the set of editing restrictions which shall be enforced on a given document.
Public propertyEnforceEditingRestriction
Gets or sets a value indicating whether document protection settings shall be enforced for a given document.
Public propertyHasPassword
Gets a value indicating whether document protection has password.
Public propertyLimitFormatting
Gets or sets a value indicating whether formatting is limited just to unlocked styles.
Document protection is a set of restrictions used to prevent unintentional changes to all or part of a document - since this protection does not encrypt the document, malicious applications may circumvent its use. This protection is not intended as a security feature and may be ignored.
See Also