PHP:wkhtmltopdf snappy(包装器)失败
我在将wkhtmltopdf与snappy一起使用时遇到问题。 我已经在mac osx上安装了带有自制程序的wkhtmltopdf 我使用以下代码在浏览器中显示PDF:PHP:wkhtmltopdf snappy(包装器)失败,php,pdf,wkhtmltopdf,snappy,Php,Pdf,Wkhtmltopdf,Snappy,我在将wkhtmltopdf与snappy一起使用时遇到问题。 我已经在mac osx上安装了带有自制程序的wkhtmltopdf 我使用以下代码在浏览器中显示PDF: <?php header('Content-Type: application/pdf'); header('Content-Disposition: attachment; filename="file.pdf"'); require_once('snappy/autoload.php');
<?php
header('Content-Type: application/pdf');
header('Content-Disposition: attachment; filename="file.pdf"');
require_once('snappy/autoload.php');
use Knp\Snappy\Pdf;
$snappy = new Pdf('/usr/local/bin/wkhtmltopdf');
echo $snappy->getOutput('http://www.github.com');
?>