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

2 Answers 2


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

  • 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
    Commented Sep 18, 2012 at 8:41
  • try this link might help c-sharpcorner.com/uploadfile/hirendra_singh/… if not i will keep looking Commented Sep 18, 2012 at 8:48
  • the link is for showing pdf file using .NET framework only :(
    – alam235
    Commented Sep 18, 2012 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 ? Commented Sep 18, 2012 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
    Commented Sep 18, 2012 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.

  • 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 :) Commented Sep 18, 2012 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
    Commented Sep 18, 2012 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
    Commented Sep 18, 2012 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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