問題描述
我正在嘗試尋找一種在 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 文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!