doc.Unprotect() method

Hi,
Why doc.Unprotect() method does not take password as an argument? Now using Aspose anyone can unprotect the document & misuse it.
I think it should only unprotect the document if the original password is provided. As far as I know microsoft word does not allow to unprotect the document unless the password is provided…
Thanks
KP King

Hi

Thanks for your inquiry. If you would like to protect your document from changing you can specify password to open the document. This is called encrypting. In this case anyone will not be able to open your document without password.
Best regards,

Thanks for your reply,
My point is some what different than what you have explained. Consider a scenario where I have protected my word document with ProtectionType “AllowOnlyFormFields” & password. In this case I will allow users to open the document without password (encryption) but they can only change the data in form fields.
Using aspose Unprotect methods we can remove the ProtectionType “AllowOnlyFormFields” without password & then entire document is available for modification.
It’s very rare case that user will use aspose libraries to unprotect the document :slight_smile: but I just thought of this scenario so raising this query.
Thanks
KP King.

Hi

Thank you for additional information. If user wants to unprotect the document, I think he/she will find a tool that can do that. Anyway, if we disallow to unprotect documents without password, this will be included in one of future versions, so user can take some old version of Aspose.Words and unprotect the document.
Another thing – when you protect the document using Aspose.Words, you can specify the password or not specify it. When you do not specify the password, Aspose.Words generates password internally, so no one know the password. This makes impossible to unprotect the document if Unprotect method will require the password.
So, I do not think that we should change Unprotect method.
Best regards.