WriteProtection

WriteProtection

概述

WriteProtection 是 Aspose.Words FOSS 中用于 .NET 的一个类。

指定文档的写保护设置。

此类提供 2 个用于在 .NET 程序中处理 WriteProtection 对象的方法。可用的方法包括:SetPassword、ValidatePassword。在安装了 Aspose.Words FOSS for .NET 软件包后,所有公共成员对任何 .NET 应用程序均可访问。属性:IsWriteProtected、ReadOnlyRecommended。

属性

名称类型访问描述
ReadOnlyRecommendedbool读写指定文档作者是否建议将文档以只读方式打开。
IsWriteProtectedbool读取当设置了写保护密码时返回 true。

方法

签名描述
SetPassword(password: string)为文档设置写保护密码。
ValidatePassword(password: string)如果指定的密码与文档受写保护时使用的写保护密码相同,则返回 true。

另请参阅

 中文