How to get the Pdf Document Privilage : Page Commenting Property is Allowed or no

Hi ,
i have pdf document which has a pdf security (Commenting) ,so i want to check commenting is allowed or not…

@rampujar

Would you please share your sample PDF document with us. We will test the scenario in our environment and address it accordingly.

Hi

added the document please find the solutiontoc.pdf (42.2 KB)

In this file have security as commenting is allowed ,but hot get get allowed or not allowed by through api.

@rampujar

Please use following code snippet to get AllowCopy permission status:

var pdf = new Document(dataDir + "toc.pdf");
Facades.PdfFileInfo info = new Facades.PdfFileInfo();
info.BindPdf(pdf);
Aspose.Pdf.Facades.DocumentPrivilege privilege = info.GetDocumentPrivilege();
bool AllowCopy = privilege.AllowCopy;

Hi
need allowed and not allowed commenting security api not for copying please check issue description

@rampujar

Comments can be added in PDF documents using Annotations and in order to check related permission, please use following code snippet:

bool AllowCommenting = privilege.AllowModifyAnnotations;