我对laravel腔和Phpdocx非常陌生。我有一个.docx文件,我正试图将其转换为.pdf,如下所示-
$docx = new \Phpdocx\Create\CreateDocx();
$docx->transformDocument('document.docx', 'document.pdf');但这并不是转换文档,甚至不会抛出任何错误。有人能帮我实现我的目标吗。提前谢谢。
发布于 2022-09-30 14:17:35
来自文档:https://www.phpdocx.com/documentation/conversion-plugin/conversion-plugin-installation-and-set-up
确保您正在设置正确的配置。文件: config\phpdocxconfig.in
; libreoffice, native, msword, openoffice
method = "libreoffice"
; libreoffice installation path, absolute path
path = "/usr/lib/libreoffice/program/soffice"
;path = '"C:\Program Files\LibreOffice\program\soffice.exe"'
; custom HOME folder; allows setting a custom HOME folder when doing the transformations using LibreOffice
;home_folder = ""https://stackoverflow.com/questions/67486387
复制相似问题