title: How to save generated pdf in server using dompdf php lib
body: <p>I am using dompdf php lib for generating pdf.</p>
  
  <p>Right now it ask user to save the file in their machine.</p>
  
  <p><strong>Code i tried so far:</strong></p>
  
  <pre><code>&lt;?php
  $dompdf = new Dompdf();
  $dompdf-&gt;loadHtml($html);
  $dompdf-&gt;render();
  $dompdf-&gt;stream($filename.'.pdf');
  $output = $dompdf-&gt;output();
  file_put_contents($filename.'.pdf', $output);
  ?&gt;
  </code></pre>