Search through PDF files with PHP(使用 PHP 搜索 PDF 文件)
问题描述
我正在尝试寻找一种在 PDF 文件中进行搜索的方法.我遇到了 PHP PDF 类,但似乎找不到任何用于读取/搜索文件流的函数.
所以,尽管我很天真,但我尝试使用 file_get_contents() 来简单地获取一个流,显然它是一个类似加密的输出;)
所以我的问题是,有没有办法搜索 PDF 文件?我正在寻找纯脚本/免费/开源解决方案,而不是购买一些昂贵的商业图书馆.
XPDF?
有一篇博文 这里 可能会有所帮助.>
似乎有一些代码 here 可以提供帮助 - 一个简单的类,读取将 PDF 转换为纯文本.不确定它是否支持解密.
PHP 文档中还有许多资源可以帮助您.点击.
FPDF 和 FPDI 也可能有帮助.经过一番研究,这可能是您最好的选择.**
I'm trying to find a way to search inside PDF files. I came accross the PHP PDF class but I can't seem to find any function for reading/searching a filestream.
So, as naive as I am, i tried to simple get a stream using file_get_contents(), obviously it's an encrypted-like output ;)
So my question, is there any way to search through PDF files? I'm looking for script-only / free / open source solutions and not buying some expensive commercial libraray.
XPDF?
There is a blog post here that may be of help.
There seems to be some code here that could help - a simple class that reads a PDF into plaintext. Unsure if it supports decryption.
There are also a number of resources in PHP documentation that may help you. Click.
FPDF and FPDI may also help. Probably your best bet after some research.**
这篇关于使用 PHP 搜索 PDF 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 PHP 搜索 PDF 文件


- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- PHP - if 语句中的倒序 2021-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- PHP foreach() 与数组中的数组? 2022-01-01