Fatal error: Call to a member function build_tree() on null in ... vendor\dompdf\dompdf\src\Dompdf.php on line 580
<p>I tried integrating <code>"dompdf/dompdf": "^0.7.0"</code>in my app, I am literally, trying it out using their example:</p>

<pre><code>$app-&gt;pdf-&gt;loadHtml('hello world');

// (Optional) Setup the paper size and orientation
$app-&gt;pdf-&gt;setPaper('A4', 'landscape');

// Render the HTML as PDF
$app-&gt;pdf-&gt;render();

// Output the generated PDF to Browser
$app-&gt;pdf-&gt;stream();
</code></pre>

<p>and yet I am getting this error:</p>

<blockquote>
  <p>Fatal error: Call to a member function build_tree() on null in xxx\vendor\dompdf\dompdf\src\Dompdf.php on line 580</p>
</blockquote>

<p>They do not have documentation for setting up, am I missing something? Hope somebody can help. Thank you!</p>