“系统找不到指定的路径。” stdout:“”命令:/ usr / local / bin / wkhtmltopdf

时间:2019-05-23 14:49:07

标签: laravel

我正在使用此软件包 https://github.com/barryvdh/laravel-snappy

要生成pdf文件,我会跟踪文档进行安装,但我收到此错误

Config / snappy.php

const apiURL = 'https://jsonplaceholder.typicode.com/todos/1';
const badURL = 'zhttps://wcaf.fajfkajf.gg'

async function getData(url){
  try {
     const response = await fetch(url);
     const json = await response.json();
     console.log(json);
  } catch (e) {
     console.log('cannot load api');
  }
}
  
getData(apiURL);
getData(badURL);

PrintCntroller

<?php

return array(


    'pdf' => array(
        'enabled' => true,
        'binary'  => base_path('vendor/h4cc/wkhtmltopdf-i386/bin/wkhtmltopdf-i386'),
        'timeout' => false,
        'options' => array(),
        'env'     => array(),
    ),
);

错误图片 enter image description here

1 个答案:

答案 0 :(得分:0)

一个现金问题:(我用这个解决了

php artisan config:cache
php artisan cache:clear