Hi -
I have batch of PDFs and need to change the permissions of Changing the document to be Allowed from Not Allowed (see screen shot).
I tried using the below code but not working…
pdf = new Aspose.Pdf.Document(fileName);
Aspose.Pdf.Facades.DocumentPrivilege privilege = Aspose.Pdf.Facades.DocumentPrivilege.AllowAll;
privilege.AllowPrint = true;
privilege.AllowCopy = true;
privilege.AllowAssembly = true;
privilege.AllowModifyContents = false;
privilege.AllowDegradedPrinting = true;
privilege.AllowFillIn = true;
privilege.AllowModifyAnnotations = true;
privilege.AllowPrint = true;
privilege.AllowScreenReaders = true;
privilege.ChangeAllowLevel = 4;
Aspose.Pdf.Facades.PdfFileSecurity fs = new Aspose.Pdf.Facades.PdfFileSecurity();
fs.BindPdf(pdf);
fs.SetPrivilege(privilege);
pdf.Decrypt();
pdf.Save(filePath + "\\RemovedSecurity" + timestamp + ".pdf");