Search code examples
c#pdfifilter

Programmatically determine which iFilters are installed


I have a problem whereby the Adobe PDF iFilter doesn't work consistently for us. As such, we like to use the one from Foxit. The problem is, if we install the Foxit iFilter and then later the client decides to reinstall Adobe Reader it may overwrite the Foxit iFilter.

We can use tools such as IFilter Explorer to view this but I'd like a way to do this in the application and warn the user/client that the iFilter has changed.

Is there a way to check iFilters from code (C#)? Or other potential solutions to this problem?


Solution

  • Since the foxit IFilter implements IPersistStream interface, I think you can try get this interface from the IFilter, and query for its CLSID to see if it is the one from foxit. Foxit IFilter has a CLSID of {987f8d1a-26e6-4554-b007-6b20e2680632}, which is the "Persistent Handlers Addins Registered" column in IFilter Explorer.

    Adobe's IFilter doesn't seem to be implementing this interface.