我试过阅读 .docx 文件。我成功读取了 .docx 文件。但我必须用 PHPWord 阅读 .pdf 文件。知道我该怎么做吗?我试过代码// Read contents$source = "./example.pdf";$phpWord = \PhpOffice\PhpWord\IOFactory::load($source, 'Word2007');$data = '';$section = $phpWord->addSection();$section->addText($data);$name = "officefile";$source = __DIR__ . "/results/{$name}.html";// Saving the document as HTML file...$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'HTML');$objWriter->save($source);
添加回答
举报
0/150
提交
取消