首页 > 解决方案 > Laravel-Snappy PDF 突然停止工作 - Windows

问题描述

我正在使用 Snappy PDF(Windows 10 本地开发)

wkhtmltopdf --version
wkhtmltopdf 0.12.5 (with patched qt)

config\snappy.php文件看起来像这样

<?php

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\wkhtmltoimage.exe"',
        'timeout' => false,
        'options' => array(),
        'env'     => array(),
    ),

 );

它突然停止工作

The exit status code '-1073740771' says something went wrong: stderr: "Loading pages (1/6) [> ] 0% [======> ] 10% [========> ] 14% [=================> ] 29% [=====================> ] 36% [========================> ] 41% QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files [==========================> ] 44% [===========================> ] 46% [=============================> ] 49% [============================================================] 100% " stdout: "" command: "C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe" --lowquality --orientation "landscape" --page-size "a5" --footer-right "Page [page] of [topage]" 

此问题仅存在于 windows 环境中。我检查了我在 Ubuntu 16.0.4 上的产品,它运行良好。

标签: laravellaravel-snappy

解决方案


我已将端口 8080 分配给物理打印机。更正了它,现在一切正常。


推荐阅读