snappy ライブラリの例を試すのに苦労しました。getOutput 関数を使用して表示しようとすると、ブラウザーが ERR_INVALID_RESPONSE を返します。ここに投稿された解決策を試しましたが、うまくいきません。
ここに私の関数の私のコードがあります:
// Display the resulting pdf in the browser
// by setting the Content-type header to pdf
$snappy = new Pdf('/usr/local/bin/wkhtmltopdf');
header('Content-Type: application/pdf',true,200);
header('Content-Disposition: attachment; filename="file.pdf"');
echo $snappy->getOutput('http://www.github.com');
あなたの助け/提案/アドバイスは非常に高く評価されます. 前もって感謝します!