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);


Guest Author: Kevin Gallagher19 Jan 2012

Works well for me.

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: