Dompdf: not downloading pdf file

Created on 3 Nov 2016  路  3Comments  路  Source: dompdf/dompdf

My php file will run fine but it will not download the file to my download folder. I don't have a specified path to download anywhere, so I believe it should simply download to the browser but does not. Please help.

I have a require once of the autoload.inc.php and use Dompdf\Dompdf;

Also,

$dompdf = new Dompdf();
$dompdf->loadHtml($html);
$dompdf->setPaper('A4', 'landscape');
$dompdf->render();
$dompdf->stream("Case");

Most helpful comment

You might try ending execution of the file. There have been instances where the process does not end, causing the PDF to not download. Try adding an exit; statement after the dompdf code. Could also be related to #1282.

All 3 comments

What does happen?

My php file runs fine through developer tools completely but a pdf is not produced. No errors are thrown.

You might try ending execution of the file. There have been instances where the process does not end, causing the PDF to not download. Try adding an exit; statement after the dompdf code. Could also be related to #1282.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Arthi93 picture Arthi93  路  3Comments

UweKeim picture UweKeim  路  4Comments

nostalgicdodo picture nostalgicdodo  路  4Comments

PhenX picture PhenX  路  3Comments

fillmore-admin picture fillmore-admin  路  4Comments