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 文件
基础教程推荐
- php中的PDF导出 2022-01-01
- Yii2 - 在运行时设置邮件传输参数 2022-01-01
- php 7.4 在写入变量中的 Twig 问题 2022-01-01
- Web 服务器如何处理请求? 2021-01-01
- 使用 scandir() 在目录中查找文件夹 (PHP) 2022-01-01
- PHPUnit 的 Selenium 2 文档到底在哪里? 2022-01-01
- 主题化 Drupal 7 的 Ubercart “/cart"页 2021-01-01
- php中的foreach复选框POST 2021-01-01
- 如何在数学上评估像“2-1"这样的字符串?产生“1"? 2022-01-01
- 将变量从树枝传递给 js 2022-01-01
