Laravel pdf generation display (snappy library) returning ERR_INVALID_RESPONSE
<p>I have some trouble trying out the example of the snappy library. when i am trying to display using the getOutput function the browser is returning a ERR_INVALID_RESPONSE. i tried the solution posted <a href="https://stackoverflow.com/questions/34599266/pdf-generation-results-in-err-invalid-response-in-chrome">here</a> but it doesn't work for me. </p>

<p>here is my code on my function:</p>

<pre><code>    // 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-&gt;getOutput('http://www.github.com');
</code></pre>

<p>Your help/suggestions/advice will be very much apprciated. Thank you in advance!</p>