5

I would like to extract the text from documents stored in a SharePoint 2013 online Document Library.

I have the document loaded using:

ClientResult<Stream> data = file.OpenBinaryStream();

Ideally I would like to use iFilters to extract the text to a string (I would prefer this method as OpenXML will limit the documents types and versions).

I know this is a big ask but could anyone provide guidance on passing the data through an iFilter to produce a string that contains it's plain text.

This Link has an example of exactly what I would like to achieve but it expects a local file - could anyone advise on how a SharePoint file could be passed into this example.

I am using C# CSOM and would really appreciate any guidance.

  • I have used codeproject.com/Articles/13391/Using-IFilter-in-C which is great for files on a local machine but I am stuck on how I could pass a SharePoint file into this example. Beers are on me for anyone who can help! Thanks again. – BrenClarke Mar 11 '14 at 17:11
  • What type of documents are present? Do you wish to extract document text or document properties? – variable Mar 12 '14 at 8:41
  • Simple awnser: why don't you save the binary stream to a temp folder? – Evariste Oct 17 '15 at 5:35
1

If you need to access document properties metadata then you can use Quick Parts.

In order to access the document text, you will have to use SharePoint and OpenXML to read the document text. Here is an article.. Here are some articles that will give you way ahead with examples.

SharePoint and Open XML

Modifying an Open XML Document in a SharePoint Document Library

Modifying Open XML Documents using the SharePoint Object Model

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.