我試過(guò)閱讀 .docx 文件。我成功讀取了 .docx 文件。但我必須用 PHPWord 閱讀 .pdf 文件。知道我該怎么做嗎?我試過(guò)代碼// 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);
- 1 回答
- 0 關(guān)注
- 102 瀏覽
添加回答
舉報(bào)
0/150
提交
取消