c#:如何在应用程序中调用IFIlter? [英] c#: how to call IFIlter in application?

查看:273
本文介绍了c#:如何在应用程序中调用IFIlter?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用IFilters从许多文件类型中提取文本。

这是可能的,但是:



我无法打电话Windows 8和Windows Server 2012中的默认pdf IFilter:



glcndFilter.dll



它给了我一个错误。

另外,Filtdump.exe也会出错:

无法CoCreate ILoadFilter实例,hr == 0x80040154

FILTDUMP失败,hr == 0x80040154



同时我的应用程序可以调用任何其他过滤器。



如何要做什么?



我想在我的c#应用程序中打开文件pdf,doc,txt等,并使用IFilter从文件中提取纯文本。

现在我可以为任何文件类型执行此操作但只有pdf问题。

原因是:Microsoft为Windows 8和Windows Server提供了自己的用于pdf glcndFilter.dll的IFilter 2012.我无法调用此过滤器(见上文)。

但是SQL Server在同一台机器上使用此过滤器。



我用过的这个非常有用的代码

https://github.com/Sicos1977/IFilterTextReader [ ^ ]

I'd like to use IFilters to extract text from many filetypes.
It is possible, but:

I cannot call default pdf IFilter in Windows 8 and Windows Server 2012:

glcndFilter.dll

It gives me an error.
Also, Filtdump.exe gives an error on it too:
Failed to CoCreate ILoadFilter instance, hr == 0x80040154
FILTDUMP failed, hr == 0x80040154

In the same time my application can call any other filters.

How to do it?

I want to open file pdf, doc, txt etc in my c# application and extract plain text from the file using IFilter.
Now I can do it for any filetypes but only problem with pdf.
The reason is: Microsoft provides its own IFilter for pdf glcndFilter.dll for Windows 8 and Windows Server 2012. I cannot call this filter (see above).
BUT SQL Server is using this filter on the same machine.

I used this very useful code
https://github.com/Sicos1977/IFilterTextReader[^]

推荐答案

使用IFilter实现TextReader以提取各种文件内容 [ ^ ] br />
选中此链接
Implementing a TextReader to extract various files contents using IFilter[^]
Check this link


这篇关于c#:如何在应用程序中调用IFIlter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆