如何编程搜索在C#中的PDF文档 [英] How to programatically search a PDF document in c#

查看:134
本文介绍了如何编程搜索在C#中的PDF文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需要搜索的PDF文件,看是否有certin字符串是present。有问题的字符串是肯定的连接codeD文本(即它不是一个图像或任何东西)。我曾尝试过搜索,就好像它是纯文本文件,但是这并不能正常工作。

I have a need to search a pdf file to see if a certin string is present. The string in question is definately encoded as text (ie. it is not an image or anything). I have tried just searching the file as though it was plain text, but this does not work.

是否有可能这样做吗?是否有任何图书馆的在那里为.net2.0,将提取/解code中的所有文本输出的PDF文件给我吗?

Is it possible to do this? Are there any librarys out there for .net2.0 that will extract/decode all the text out of pdf file for me?

推荐答案

有一些库可以在那里。 看看<一href="http://www.$c$cproject.com/KB/cs/PDFToText.aspx">http://www.$c$cproject.com/KB/cs/PDFToText.aspx 和 http://itextsharp.sourceforge.net/

There are a few libraries available out there. Check out http://www.codeproject.com/KB/cs/PDFToText.aspx and http://itextsharp.sourceforge.net/

这需要努力一点点,但它是可能的。

It takes a little bit of effort but it's possible.

这篇关于如何编程搜索在C#中的PDF文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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