PdfFileInfo HasOpenPassword

Hello,

I want to check PDF files if they have a password to open the document with Aspose.Pdf for .NET 6.9.0.0.
I tryed this:

PdfFileInfo fileInfo = new PdfFileInfo(filename);
if (fileInfo.IsPdfFile)
{
if (fileInfo.IsEncrypted)
{
if (fileInfo.HasOpenPassword)
{
return true;
}
}
}
But it seems that HasOpenPassword don’t work. Its always true even if the document has no password for open the document. The documents just have a password for edit, but that I don’t request.

Regards
Andreas

Hi Andreas,

Thanks for using our products and sharing the sample source code. I tested the scenario with your provided source code and template document (attached) using Aspose.Pdf for .NET v7.0 and noticed that HasOpenPassword property return false. Kindly use the latest version of Aspose.Pdf for .NET v7.0 and check if it works fine for you. If you still face any problem, kindly share the source documents with us. This will help us to identify the issue and reply back to you soon.

Please feel free to contact support in case you need any further assistance.

Thanks & Regards,

I tryed with the latest version Aspose.Pdf for .NET v7.0 but its still the same.

I send you here 2 Pdf documents which have no OpenPassword (only EditPassword) but HasOpenPassword return true.

Regards
Andreas

Hi Andreas,

Thanks for sharing the template documents with us. I tested the scenario and able to notice the same problem. For rectification, I logged this problem with ID: PDFNEWNET-33768 in our Issue Tracking System. We will further look into the details of this issue and will keep you updated via this forum thread on the status of correction.

We apologize for your inconvenience.

Thanks & Regards,

Hi Andreas,

Thank you for your patience.

I am very pleased to inform you that the issue is resolved by the development team and this issue will be a part of Aspose.Pdf for .NET v7.1 (to be released in June as per our monthly release plan) after following the complete testing and release cycle. Please be patient and we will notify you once the version is available for download.

We apologize for your inconvenience.

Thanks & Regards,

The issues you have found earlier (filed as PDFNEWNET-33768) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.