如何获取包含关键字的PDF的文件路径? [英] How Can I get the file path of a PDF that contains a keyword?

查看:141
本文介绍了如何获取包含关键字的PDF的文件路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在项目中添加一个搜索选项,使用户可以在保存在文件夹及其子文件夹中的所有Word,Excel和PDF文件中搜索关键字.

我可以使用powershell获取所有txt和doc文件的文件路径.但是,在PDF和Xls,xlsx和csv文件中进行搜索时,我的工具失败了.

我目前正在将Visual Studio 2010与C#语言结合使用.

要考虑的事情.
我们不知道文件名,我们不知道文件夹名.
我们只需要文件路径作为字符串即可.

请提供帮助!

谢谢...

I need to add a search option to my project that will allow the user to search for a keyword in all the Word, Excel, and PDF files that are saved on a folder and it''s subfolders.

I am able to get the filepath for all the txt and doc files using powershell. But when it comes to search within PDF and Xls, xlsx and csv files my tool fails.

I am currently using Visual Studio 2010 with the C# lenguage.

Things to consider.
We don''t know the file names, we don''t know the folder names.
We only need the file path as a result in a string.

Please provide help!

Thanks...

推荐答案

您要么必须开发出一种应用程序,它可以理解您要搜索的所有格式-Lotus Magellan,有人吗? -或使用他人的技术

MS Search似乎知道很多格式,并且具有 SDK [^ ]
you''ve either got to develop an application that understands all the formats you want to search through - Lotus Magellan, anyone? - or use someone else''s technology

MS Search seems to know quite a few formats and has an SDK[^]


这篇关于如何获取包含关键字的PDF的文件路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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