How can i traverse the contents present inside PDF file. Suppose i have PDF documents inside a document library and I need to read contents inside PDF file to know the type of PDF file whether its a college book or a school book(example).

Can i use OpenXML sdk for this. I have already used Open SDk to read word file contents.

Any help is much appreciated.

Thanks in advance Alam


To be honest, I don't think you can, however what you can do is download file and use a third party dll to prase file to word and read it.


Hope it helped :)

There can be another way of doing it, when someone uploads the file to document library add another column to find out what type of PDF file it is :)

|improve this answer|||||
  • Thanks for the reply Yaron. I do have another column but at the time of upload we have to programmatically add the information in that column by searching the contents inside pdf file. We can't allow user to specifically update document metadata, he can only be able to upload files to the document library. – alam235 Sep 18 '12 at 8:41
  • try this link might help c-sharpcorner.com/uploadfile/hirendra_singh/… if not i will keep looking – Mathematics Sep 18 '12 at 8:48
  • the link is for showing pdf file using .NET framework only :( – alam235 Sep 18 '12 at 8:53
  • so what you will going to be doing is, when someone adds a PDF file to document library a event will occur, which you will develop in C# if am right ? – Mathematics Sep 18 '12 at 8:56
  • yes exactly after document is uploaded, i ll extract the information from the pdf file and perform all the events through code. – alam235 Sep 18 '12 at 9:08

Another more enterpriseish solution is to use SharePoint search functionality.
PDF files can be indexed using FAST search of iFilter 9.
With PDF files indexed it is possible to at least search for content, and perhaps even extract it.

Beside that you could use something like Aspose.Pdf.

|improve this answer|||||
  • Aspose.Pdf is not free, however if that what he wants then Oracle provides a free dll for PDF conversion and operations like that would be best solution :) – Mathematics Sep 18 '12 at 8:24
  • Yes same with FAST search, definitely not free :) Aspose was just the first I found on NuGet when searching for pdf sorted by popularity which seemed to handle reading (not just generating) – eirikb Sep 18 '12 at 8:37
  • Thanks eirikb for the reply. But my purpose is not to search pdf files but to go inside a pdf file and extract information. – alam235 Sep 18 '12 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.