I'm trying to check whether PDF document to be uploaded has the following document properties - Content Copying & Content Copying For Accessibility Allowed / Not Allowed using iTextSharp PDFReader. Is there any property to verify this functionality. I have pasted a sample code which is NOT returning the expected result.
Looking for solution using iTextSharp
Sample Code:
using (PdfReader r = new PdfReader(@"xxx\yyy.pdf"))
{
if (PdfEncryptor.IsScreenReadersAllowed((int)(r.Permissions)))
{
Console.WriteLine("Content Accessibility Enabled");
}
if (PdfEncryptor.IsCopyAllowed((int)(r.Permissions)))
{
Console.WriteLine("Copy Enabled");
}
if (PdfEncryptor.IsAssemblyAllowed((int)(r.Permissions)))
{
Console.WriteLine("Document Assembly Enabled");
}
}