IPresentationInfoCheckWriteProtection Method

Checks whether a password to modify is correct for a write protected presentation.

Namespace:  Aspose.Slides
Assembly:  Aspose.Slides (in Aspose.Slides.dll) Version: 21.11.0.0 (21.11)
Syntax
bool CheckWriteProtection(
	string password
)

Parameters

password
Type: SystemString
The password to check.

Return Value

Type: Boolean
True if the presentation is write protected and the password is correct. False otherwise.
Exceptions
ExceptionCondition
InvalidOperationException
Remarks
1. You should check the IsWriteProtected property before calling this method. 2. When password is null or empty, this method returns false.
Examples
[C#]
IPresentationInfo info = PresentationFactory.Instance.GetPresentationInfo(presentationFilePath);
if (info.IsWriteProtected == NullableBool.True)
{
    bool isWriteProtectedByPassword = info.CheckWriteProtection("my_password");
}
See Also