先感谢您
我正在使用该PdfParser
库从 PDF 中提取文本
我目前的代码如下
$parser = new \Smalot\PdfParser\Parser();
$pdfsource = $parser->parseFile($dest_path);
$pages = $pdfsource->getPages();
foreach ($pages as $page) {
$final_text.=strtolower(str_replace(' ', '', $page->getText()));
}
它运行良好,但某些 PDF 低于异常
Fatal error: Uncaught Exception: Object list not found. Possible secured file. in /var/www/html/pdfparser-master/vendor/smalot/pdfparser/src/Smalot/PdfParser/Parser.php:102 Stack trace: #0