Getting Pdf File information

This resource will display the title,author,subject,kewords in the pdf.



PDFSHELLSERVERLib.PDFShellInfoClass pdfinfo = new PDFSHELLSERVERLib.PDFShellInfoClass();
string title, subj, author, keyword;
pdfinfo.GetColumnInfo(@"path\dotnet.pdf", out title, out subj, out author, out keyword);

Response.Write(title+"
");
Response.Write(subj + "
");
Response.Write(author + "
");
Response.Write(keyword + "
");


Comments

Author: Danasegarane.A06 Apr 2010 Member Level: Gold   Points : 1

I don't know How editors allow this kind of code snippet. I am sure that there is no component like PDFSHELLSERVERLib in .Net.

The author should post the link where to get the the PDFSHELLSERVERLib

Author: Bobby06 Apr 2010 Member Level: Gold   Points : 1

resource which I posted is currently working.if (Danasegarane.A ) you dont know then ask and learn instead dont have to use such accent.

now do like this:right click on bin->select add reference->then select com tab->choose "Interop.PDFSHELLSERVERLib.dll" then it'll appear in to ur bin folder.

Author: Danasegarane.A06 Apr 2010 Member Level: Gold   Points : 1

Thanks for the reply. Sorry If my word hurts you. I tried this before I post. Could Please in what version of Visual Studio I can found this one. I am using VS2005. But I could not able to find that one

Author: Danasegarane.A06 Apr 2010 Member Level: Gold   Points : 1

Dear Bobby,
Now I have a basic question. Why do you miss this information in the original post ?


now do like this:right click on bin->select add reference->then select com tab->choose "Interop.PDFSHELLSERVERLib.dll" then it'll appear in to ur bin folder

Author: Naveen Kumar06 Apr 2010 Member Level: Gold   Points : 1

resource which I posted is currently working.if (Danasegarane.A ) you dont know then ask and learn instead dont have to use such accent.





thanks& regards
naveen kumar

Author: Danasegarane.A06 Apr 2010 Member Level: Gold   Points : 1

Mr. Naveen,
You should post the resource in such a manner that a new comer should also able to learn.

Guest Author: 17 Nov 2011

hello bobby can you please tell me how to read metadata of *.chm and *.doc(and other microsoft office extension) it will be really helpfull

Thank you

Guest Author: Gourav17 Nov 2011

hello bobby can you please tell me how to read metadata of *.chm and *.doc(and other microsoft office extension) it will be really helpfull

Thank you

Author: Bobby20 Nov 2011 Member Level: Gold   Points : 4

Check the below snippet it may useful for you,

We have to use a Microsoft COM component called "Microsoft Word 9.0 object library" which provides classes and methods to read from a word document.

We have to use Word.ApplicationClass to have access to the word application.

Open the word document in memory, copy all the content to the clipboard and then we can take the data from the clipboard.

The code required is given below:

Word.ApplicationClass wordApp=new ApplicationClass();
object file=path;
object nullobj=System.Reflection.Missing.Value;
Word.Document doc = wordApp.Documents.Open(
ref file, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj);
doc.ActiveWindow.Selection.WholeStory();
doc.ActiveWindow.Selection.Copy();
IDataObject data=Clipboard.GetDataObject();
txtFileContent.Text=data.GetData(DataFormats.Text).ToString();
doc.Close();



  • 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:
    Email: