Hi ,
I am using atatched file to check if it has Open or Edit password or both.
I am using below code to check it , but when control goes to fileinfo.HasEditPassword, it is throwing InvalidPasswordException.
try
{
string filePath = "FileLocation";//some dummy fie location path
PdfFileInfo fileinfo = new PdfFileInfo(filePath);
bool isEncrypted = fileinfo.IsEncrypted;//output True
bool isIOpen = fileinfo.HasOpenPassword;//output True
bool isEdit = fileinfo.HasEditPassword;//throwing InvalidPasswordException
}
catch (Aspose.Pdf.Exceptions.InvalidPasswordException)
{
}
Please assist how can i check for HasEditPassword without providing any passwords.
Thanks:
Anupam