Php 转换失败!联系服务器管理员。使用OfficeConverter时出错

Php 转换失败!联系服务器管理员。使用OfficeConverter时出错,php,laravel,controller,phpword,phpoffice,Php,Laravel,Controller,Phpword,Phpoffice,我不想把.docx文件转换成PDF格式。如果我使用PhpOffice\PhpWord库,我将丢失我的样式,因此我尝试使用OfficeConverter,但出现以下错误: “转换失败!请与服务器管理员联系。” 我的控制器里有这个 $converter = new OfficeConverter(storage_path('./../MyFile.docx')); $converter->convertTo(storage_path('./../MyFile.pdf'));

我不想把.docx文件转换成PDF格式。如果我使用PhpOffice\PhpWord库,我将丢失我的样式,因此我尝试使用OfficeConverter,但出现以下错误: “转换失败!请与服务器管理员联系。

我的控制器里有这个

    $converter = new OfficeConverter(storage_path('./../MyFile.docx'));
    $converter->convertTo(storage_path('./../MyFile.pdf'));
在这个php文件的头中,我还有:

    use NcJoes\OfficeConverter\OfficeConverter;
    use PDF;
这个“使用PDF”是这样的,因为我已经在Config\app.php中声明了提供者和别名

有人知道我为什么会犯这个错误吗?谢谢