Click or drag to resize
WriteProtection Class
Represents the write protection options for the DocumentModel. Supported only in DOCX and DOC formats.
Inheritance Hierarchy
SystemObject
  GemBox.DocumentWriteProtection

Namespace:  GemBox.Document
Assembly:  GemBox.Document (in GemBox.Document.dll) Version: 25.3.30.1255
Syntax
public sealed class WriteProtection

The WriteProtection type exposes the following members.

Constructors
  NameDescription
Public methodWriteProtection
Initializes a new instance of the WriteProtection class.
Top
Properties
  NameDescription
Public propertyHasPassword
Returns if DocumentModel is protected with the password against re-saving to the same file name.
Public propertyReadOnlyRecommended
Gets or sets option that specifies if applications should provide user interface recommending that the user open this document in write protected state.
Top
Methods
  NameDescription
Public methodClone
Clones this WriteProtection instance.
Public methodSetPassword
Sets the write protection password for the current DocumentModel instance.
Top
Remarks

Write protection refers to a mode in which the document's contents can be edited but the document cannot be resaved using the same file name.

WriteProtection is currently not supported when exporting a document to PDF, XPS or image file formats.

For more information, see DOCX Write Protection sample.

See Also