Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

unable to check hasEditPassword property using pdfFileInfo class

$
0
0

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 = newPdfFileInfo(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

 


Viewing all articles
Browse latest Browse all 3131

Trending Articles