Free Support Forum - aspose.com

Get Document Password or Permission Password

Hy

Can you please provide me code for getting both or any of password

Or else can you help me how can I know whether Input PDF FIle has any password? and if yes, then which password is there? User or Owner Password

Thanks,

Hi,

You can not get the password of a Pdf file.

Please use BeEncrypted property of PdfFileInfo class to check if file is encrypted. You can also use GetDocumentPrivilege method of PdfFileInfo to get document's privilege settings.

Thanks.