Search a string in a file and get the page numbers(doc,pdf,ppt)
===

I have tried to search the text/string in a file(doc,pdf,ppt) and needs to get page numbers for the particular string is exist.
    Did anyone know the way to do it.(ex:storestext in db & search or ?).
    
    (or)
    
    Anyone know how to read a file(doc,pdf,ppt) page by page.
    
    Waiting for the answers, Plz help me....
    