Is there an equivalent to IFilter on Mono/Linux?
I'm converting an app from .NET/Windows to mono/linux, but I can't find any i开发者_Python百科nformation about IFilters. I'm aware of the Microsoft IFilters for Office, Adobe and FoxIt IFilters for PDF, but don't know if they work on Linux and/or Mono, or if there is something functionally equivalent (used for extracting plain text from proprietary forms).
IFilter is a native Windows API, not a .NET API.
On Linux you could use the filters from a search indexer such as Beagle.
As far as I can tell IFiler technology is still used in recent applications. In its original design (around 1996 or before) these are COM objects written in C or C++. Most IFilters available from past years will not work on 64bit. If you are building an app outside Windows, you may need to create the code that loads and calls the IFilters.
Any implementation that wants to use an IFilter needs to have some interface to load and call the IFilter in memory, point it to a file and kick it to read contents, then kick it a few times more to pull the text result from a memory buffer. Modern implementations using IFilters use more advanced memory protection to flush the memory when leaks happen, not uncommon in C coding... A few samples (from around 2003 or 2005) are available on the internet, they should work, as long as you respect the old style interface.
Hope this is of help.
Not sure if this is what you're using, but according to MSDN IFilter
(as related to the Indexing Service) is obsolete. As such I'd be surprised if it was reimplemented in Mono.
That said, many .NET assemblies can be dropped into a Mono application without recompilation. Though it seems more likely that this would be the case with a third party DLL than one from Microsoft, it may be worth a shot to see if that will work in your case.
http://msdn.microsoft.com/en-us/library/ms691105(v=vs.85).aspx
精彩评论