用PHP读取PDF文件 [英] Reading PDF files in PHP
本文介绍了用PHP读取PDF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
使用php读取pdf文件
Possible Duplicate:
Read pdf files with php
您可以使用PHP代码阅读PDF文件吗?
Can you read PDF files by using PHP code?
推荐答案
是的,可以.安装可将PDF转换为文本的命令行脚本,并在PHP中执行>
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
(源)
...或编写这样的PHP函数.
这篇关于用PHP读取PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文