Possible Duplicate:
Read pdf files with php
Can you read PDF files by using PHP code?
To read PDF files, you will need to install the XPDF ( http://www.foolabs.com/xpdf/about.html ) package, which includes "pdftotext." Once you have XPDF/pdftotext installed, you run the following PHP statement to get the PDF text:
$content = shell_exec('/usr/local/bin/pdftotext '.$filename.' -'); //dash at the end to output content
Yes, you can. Either install a command line script that can convert PDFs to text and execute this in PHP
$content = shell_exec('/usr/local/bin/pdftotext '.$filename.' -'); //dash at the end to output content
(source)
... or write a PHP function like this.
You would have to use a extension like
http://www.pdflib.com/products/pdflib-family/
or
http://framework.zend.com/manual/en/zend.pdf.html
精彩评论