0

前段时间 Laravel-snappy 在 Ubuntu 服务器上工作。但现在它不工作了。它在本地窗口系统中工作正常,但在 ubuntu 服务器上它会生成空白 pdf。wkhtmltpdf 和其他扩展已经安装在服务器上。我如何调试这个 laravel-snappy PDF。

这是屏幕截图: 在此处输入图像描述

快速的.php

return array(


    'pdf' => array(
        'enabled' => true,
        'binary'  => '/usr/local/bin/wkhtmltopdf-amd64',
        'timeout' => false,
        'options' => array(),
        'env'     => array(),
    ),
    'image' => array(
        'enabled' => true,
        'binary'  => '"/usr/local/bin/wkhtmltopdf-amd64"',
        'timeout' => false,
        'options' => array(),
        'env'     => array(),
    ),


);

请帮我

提前致谢

4

1 回答 1

0

您可能需要更改 snappy 配置。

return array(

    'pdf' => array(
        'enabled' => true,
        'binary'  => 'C://"Program Files"/wkhtmltopdf/bin/wkhtmltopdf.exe',
        'timeout' => false,
        'options' => array(),
        'env'     => array(),
    ),
    'image' => array(
        'enabled' => true,
        'binary'  => 'C://"Program Files"/wkhtmltopdf/bin/wkhtmltopdf.exe',
        'timeout' => false,
        'options' => array(),
        'env'     => array(),
    ),
);

这适用于我在 Windows 服务器中。

于 2018-10-19T09:22:39.993 回答