PDF .NET Library Logo
Home Products Code Library Online Demos Support Forum Buy About Us  
Code Library

How to extract File info, Metadata and Security Options from an existing PDF file

The following code shows how to retrieve PDF info objects.

c# sample:

PDFOperation operation = new PDFOperation("sample.pdf", "");

PDFDocInfo info = operation.DocumentInfo;

XmlDocument xml = operation.Metadata;

PDFCryptoOptions crypto = operation.ProtectionOptions;

operation.Close();

Console.WriteLine("Author: " + info.Author);

Console.WriteLine("Creation date: " + info.CreationDate);

Console.WriteLine("Keywords: " + info.Keywords);

Console.WriteLine("Subject: " + info.Subject);

Console.WriteLine("Title: " + info.Title);

Console.WriteLine("Protection options: " + crypto.ToString());

Back to PDF Code Library