Unlock all restrictions for a PDF file

Hi ,

How to decrypt to unlock all restrictions for a PDF file using Aspose.Pdf in C#
Please give me simple code

@asemalsaif

You can please use below code snippet and if you face any issues, please let us know:

Document pdfDocument = new Document();
pdfDocument.Pages.Add();
Facades.PdfFileSecurity security = new Facades.PdfFileSecurity(); 
Facades.DocumentPrivilege privilege = Facades.DocumentPrivilege.AllowAll; 
security.BindPdf(pdfDocument); 
security.SetPrivilege(privilege);
security.Save($"{dataDir}out.pdf");