|
|
Subject:
Extract text from documents using asp.net
Category: Computers > Programming Asked by: sapex-ga List Price: $10.00 |
Posted:
14 Oct 2005 23:48 PDT
Expires: 13 Nov 2005 22:48 PST Question ID: 580540 |
Objective : I need to use IIS and Indexing service to extract text out of documents (mostly office docs, html, rtf, etc which are by default supported by indexing service) Tools : Solution should be using asp.net Don'ts : Please do not use any third party or office filter solution. Office is not supposed to be installed on server. Expected : Lead me to a sample code which does this |
|
There is no answer at this time. |
|
Subject:
Re: Extract text from documents using asp.net
From: jstar-ga on 02 Nov 2005 00:05 PST |
using System; using System.IO; public void test() { StreamReader sr; string inputFile="file1.doc"; string outFile ="file2.doc"; try { sr = new StreamReader(inputFile); StreamWriter sw = new StreamWriter(outFile); String line; while ((line = sr.ReadLine()) != null) { // if you need to filter, just check the line for its context sw.WriteLine(line); } sr.Close(); sw.Flush(); sw.Close(); } catch (Exception e){Console.WriteLine(e.Message + ", " + e.StackTrace);} } |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |