We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Permissions password is set even though not provided

Hello,

I’ve used the PDFFileSecurity object to remove permissions so the end user can only print the document. This is fine but there is a permissions password being set on the file which I did not apply and being set by default. Some internal users requires the file to be unlocked temporarily so what is the default password?
This is the complete code to add the permissions:

DocumentPrivilege privilege = DocumentPrivilege.ForbidAll;
privilege.ChangeAllowLevel = 0;
privilege.AllowPrint = true;

PdfFileSecurity fileSecurity = new PdfFileSecurity();
fileSecurity.BindPdf(inputPath);
//set document privileges
fileSecurity.SetPrivilege(privilege);
// save final output file
fileSecurity.Save(outputPath);
fileSecurity.Close();
fileSecurity.Dispose();

Thank you

Hi there,


Thanks for your inquiry. I’m afraid Aspsoe.Pdf doesn’t set any default password for encryption. However, I’ve tried the scenario with a sample document but I’m unable to replicate the issue, using your sample code. Can you please share your source document here? So we look into it and suggest your accordingly. Moreover, can you please also confirm your Aspose.Pdf DLL version?

We are sorry for the inconvenience faced.

Best Regards,

Hi there, thanks for getting back to me.

I have attached two files. The first is the original file, the second is after using SetPrivilege as described above. When you look at the properties of the second file, you can see Security Method: Password Security.

I’m using Aspose.PDF for .NET version 8.3.1

Hi Philip,


<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif””>Thanks
for sharing the details.<o:p></o:p>

I have tested the scenario and I am able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFNEWNET-35769. We will investigate this issue in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.

Hello, has this issue been fixed and released? I have not seen an update so far which contains the fix. Thanks

Hi Philip,


Thanks for your patience.

The development team made some progress towards the resolution of earlier reported issue but I am afraid it’s not yet completely resolved. Nevertheless, I have intimated the development team to share the possible ETA regarding its resolution. Please be patient and spare us little time.

The issues you have found earlier (filed as PDFNEWNET-35769) have been fixed in Aspose.Pdf for .NET 9.2.0.

The blog post for this release is created over this link


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.