How to check in pdf that content copying for accessibility exists or not?
Thanks for your inquiry.
In order to check whether a PDF document security allows copying or not, please access DocumentPrivilege.AllowCopy
property while using following code snippet:
// Instantiate PdfFileInfo Class object.
Aspose.Pdf.Facades.PdfFileInfo info = new Aspose.Pdf.Facades.PdfFileInfo();
// Load your encrypted PDF document.
info.BindPdf(dataDir + "EncryptedDocument.pdf");
// Get DocumentPrivilege
Facades.DocumentPrivilege documentPrivilege = info.GetDocumentPrivilege();
// Determine AllowCopy
bool copyingContent = documentPrivilege.AllowCopy;
In event of any further query, please feel free to contact us.