我的config / snappy.php
返回数组(
'pdf' => array(
'enabled' => true,
'binary' => base_path('vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64'),
'timeout' => false,
'options' => array(),
'env' => array(),
),
'image' => array(
'enabled' => true,
'binary' => '/usr/local/bin/wkhtmltoimage',
'timeout' => false,
'options' => array(),
'env' => array(),
),
);
控制器上的PDF下载选项:
$ footer = View :: make('emails.lessonpdffooter');
$ pdf = PDF :: loadView('emails.lessonpdf',['name'=> $ taskArray])-> setOption('footer-html',$ footer);
返回$ pdf-> inline($ lessonName。'.pdf');
我得到的输出为: This is the result i got