Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am working on .Net project where we are storing word, excel, pdf documents in SQL Server as varbinary. One of the user requirement is to search word in document and if found then it should display document in browser with highlighting matching words.

We already have Google Search Appliance which does nice job of returning matching results. We have two problems,

1) Google Search Appliance does not show document in browser as its stored in database and even if it will show then because document is in word or excel format, will ask users to download it instead of directly opening it.
2) As I cannot show users document in browser, there is no way to highlight matching words in document.

One of the suggestion was to convert this varbinary into html and then show in browser window as once it’s converted in html I can play with html and highlight matching words. I am not sure how to convert word, excel, pdf documents into html without using third party tools and if I have to use third party tool then which tool is best.

I would really appreciate any help on this.

Thanks,
Tapan Desai
Posted
Comments
AspDotNetDev 28-Dec-10 17:43pm    
Yes, you have to use a third party tool. I'll let others answer with which tools they think are the best (though I wonder if you've tried any of them... I've worked with PDF tools in the past and Google was quite happy to tell me which to use, and some of them were free). I think some versions of Visual Studio allow you to create projects that work with Microsoft Office files (i.e., Word, Excel). Again, that's not my area of expertise, so I'll let others provide an actual answer as to how one might go about that.

1 solution

Go for the Lucene Dot net Framework
It will be helpful.

http://lucene.apache.org/lucene.net/[^]
 
Share this answer
 
Comments
arindamrudra 29-Dec-10 1:05am    
It indexes the table data. But he want to search from the file stored in databse in varbinary format. So I dont thik it is a good idea.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900