且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从PDF文档中提取文本?

更新时间:2023-02-12 22:11:34

下载 class.pdf2text.php @ @ http: //www.phpclasses.org/browse/file/31030.html (需要注册)

Download the class.pdf2text.php @ https://pastebin.com/dvwySU1a or http://www.phpclasses.org/browse/file/31030.html (Registration required)

代码:

include('class.pdf2text.php');
$a = new PDF2Text();
$a->setFilename('filename.pdf'); 
$a->decodePDF();
echo $a->output(); 


  • class.pdf2text.php 项目首页


    • class.pdf2text.php Project Home

      pdf2textclass不适用于我测试过的所有PDF,如果不适用于您,请尝试 PDF解析器

      pdf2textclass doesn't work with all the PDF's I've tested, If it doesn't work for you, try PDF Parser