a link to open the file in its native file format
i need to have the instance of the words in the opened file to be high lighted
In some, and likely all, cases you are going to have to modify the file. This means that either you are going to be creating a temporary file and presenting that to the user (making highlighted search results effectively Read Only), or you are going to be making changes to the original document.
Either way, how you go about making the changes to the files depends on the data format (i.e. you are going to need a different solution for PDF then for OpenDocument).
Given that you are searching them already, I think it is safe to assume that you can read the files without much difficulty. This means you might want to consider the Google approach - which is to create a copy of the document in a single standard format (Google use a combination of invalid HTML and invalid CSS) and make your changes to that copy.
|