Blank screen when using dompdf: who faced?

Trying to generate PDF from HTML using dompdf, but when you run the script you see in the browser a blank page. The error output is enabled but nothing is displayed.

Example code (use the example from the readme):
require_once '/var/www/tools/dompdf/';
use Dompdf\Dompdf;
$dompdf = new Dompdf();
$dompdf->loadHtml('hello world');
$dompdf->setPaper('A4', 'landscape');

Tried that - to no avail. In the browser a blank page, a file on the server is not created.

Added this line, but visible changes have occurred:
$dompdf->set_option('isHtml5ParserEnabled', true);

In General, I do not see any clues. I would be very grateful for any advice!
July 8th 19 at 15:56
2 answers
July 8th 19 at 15:58
Here docks they stated unequivocally:
Loads an HTML string. Parse errors are stored in the global array $_dompdf_warnings.

The question arises: "What do You have in $_dompdf_warnings?"
And what do You have in $dompdf->output ?
July 8th 19 at 16:00
Need logs.
White screen is normal, You happen to be broadcasting a file to the browser.


of course it did not help if you spend a moment and look into this with dompdf, it is possible to know what does the function stream

 * output the pdf code, streaming it to the browser
 * the relevant headers are set so that hopefully the browser will recognise it
 function stream($options = ")

if you want to save the file on the server, then after the render call:

 * Returns the PDF as a string
 * The file will open a download dialog by default. The options
 * parameter controls the output. Accepted options are:
 * 'compress' = > 1 or 0 - apply content stream compression, this is
 * on (1) by default
 * @param array $options options (see above)
 * @return string
 public function output($options = null)

and then have to keep this thing on the server

Find more questions by tags HTMLPDFPHP