It's not so easy as you would like to.
CHM and PDF is already compiled files, thus u need to know their structure
to work with, that's a bit hacky way
CHM format is here http://www.codeproject.com/csharp/HtmlHelp.asp
try to google to find a description of PDF format
> I need to search programmatically if a certain string appears inside a PDF
> or CHM file.
> The search is done only once for each file so I don't think that a solution
> to index the file using Index server is right here.
> Anyone knows how to do it?
> A simple code example will be appreciated.

Signature
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche