Porgrammatically retrieve properties of a PDF document
This code snippet allows you to retrieve the document properties of a Portable Document Format(.PDF) file. Note that MS-Word, Acrobat Reader allows you to store information like Title, Subject,Author, Keywords etc along with the respective files.
To get these information from a PDF file in your C# application, Add a reference to the COM component called PDFShellServer 1.0 Type library.
PDFSHELLSERVERLib.PDFShellInfoClass pdfinfo = new PDFSHELLSERVERLib.PDFShellInfoClass();
string title, subj, author, keyword;
pdfinfo.GetColumnInfo(@"d:\users\bala\documents\appln.pdf", out title, out subj, out author, out keyword);
Console.WriteLine(title);
Console.WriteLine(subj);
Console.WriteLine(author);
Console.WriteLine(keyword);
Works well for me.