开发者

Search through PDF files with PHP

I'm tryi开发者_StackOverflow中文版ng 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.**


A PHP search engine called Sphider has the option of adding PDF search via XPDF. You can then customise the result templates to fit in with the rest of your site (if applicable).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜