using Spire.Pdf;
using System;
namespace Detect
{
class Program
{
static void Main(string[] args)
{
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(@"C:UsersAdministratorDesktopEncrypted.pdf");
bool isEncrypted = doc.IsEncrypted;
Console.WriteLine(isEncrypted);
Console.Read();
}
}
}