在 pdf 中爬行

发布于 2024-09-02 09:20:42 字数 156 浏览 3 评论 0 原文

我正在开发一个工具,可以搜索用户在给定网站上输入的关键字。我的问题是,它仅在 html/网页上搜索关键字,而不在网站上找到的 PDF/MS-Word 文件上搜索关键字。

谁能给我推荐一些 api/工具或者提供可以从给定的在线 PDF/MS-Word/Text 文件中搜索文本的代码?

I'm developing a tool that searches the keyword entered by the user on a given site. My problem is, it searches the keyword only on html/web pages but not on the PDF/MS-Word files found on the site.

Can anyone suggest me some api/tool or provide the code that can search text from the given online PDF/MS-Word/Text file?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦屿孤独相伴 2024-09-09 09:20:43

在 JVM 上运行的任何内容中进行开发,您可能最好使用 POI 进行 MS Office 文档解析和 PDFBoxJPedalPDF Clown 用于解析 .pdf。

对于一般索引,您不会错过 lucenenutch

Developing in anything that runs on the JVM, you would probably do best using POI for MS Office document parsing and PDFBox, JPedal or PDF Clown for parsing .pdfs.

For general indexing, you wont miss with lucene and nutch.

屌丝范 2024-09-09 09:20:42

您可以对 Word 文件使用 Antiword

pdftotext 可用于 pdf 文件。

这两个命令都可以通过 apt 获得:
sudo apt-get install xpdf-utils antiword

You could probably use Antiword for word files.

pdftotext can be used for pdf-files.

Both commands available through apt:
sudo apt-get install xpdf-utils antiword

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文