1

我正在使用 snappy 和 wkhtmltopdf 来生成 pdf。该项目在本地主机中运行良好。但是,当我在实时服务器上上传项目时(我的托管服务提供商是 namecheap,我使用的托管服务是他们的“steller plus”包),我收到以下错误:

退出状态代码 '127' 表示出了点问题: stderr: "sh: publicwkhtmltopdfbinwkhtmltopdf.exe: command not found " stdout: "".....

这是我正在使用的快速配置代码:

 'pdf' => [
        'enabled' => true,
        'binary' => 'public\wkhtmltopdf\bin\wkhtmltopdf.exe' ,
        'options' => array(),
],

现在我已经搜索了一段时间的解决方案,发现需要在服务器中安装 wkhtmltopdf 之类的东西,需要使用 vps 托管等。我不是在 cpanel 上工作和在那里安装东西的专家。所以我的问题是:

如何在我描述的主机中安装 wkhtmltopdf?

它将安装在哪个位置以及需要对 snappy 配置文件进行哪些更改?

选择 VPS 主机会让这项工作变得容易吗?

4

0 回答 0