title: HTML To PDF Converter dompdf
body: <p>I want to use dompdf i've downloaded from github and extracted on my webserver but i face error as, (i'm on windows).I also tried this but didn't help</p>
  
  <pre><code>      define('DOMPDF_ENABLE_AUTOLOAD', false);
  
       &lt;br /&gt;
       &lt;b&gt;Fatal error&lt;/b&gt;:  Class 'DOMPDF' not found in           
  
       &lt;b&gt;C:\xampp\htdocs\Rental\controller\register.php&lt;/b&gt; on line &lt;b&gt;38&lt;/b&gt;&lt;br /&gt;
  </code></pre>
  
  <p>here's my code </p>
  
  <pre><code>    if(!empty($_POST['pr_data'])){
  $pr_dt=$_POST['pr_data'];
  require_once("../assets/converter/dompdf/dompdf_config.inc.php");
  $dompdf = new DOMPDF();
  $dompdf-&gt;load_html($pr_dt);
  $dompdf-&gt;render();
  $dompdf-&gt;stream("sample.pdf");
  echo $dompdf;
  exit;
  }
  
  
     jQuery('.btn-print').click(function() {
     var pr_data = jQuery('.tc').html();
     jQuery.post('../controller/register.php', {
       'pr_data': pr_data
     }, function(result) {
     console.log(result);
    });
    });
  </code></pre>
  
  <p>I downloaded dompdf from <a href="https://github.com/dompdf/dompdf" rel="nofollow">dompdf</a> i didn't use composer for installing i've used third one Download and extract </p>
  
  <p><strong>UPDATE</strong>
  I've also tried checking whether dompdf file path is correct</p>
  
  <pre><code>   if(!@include("../assets/converter/dompdf/dompdf_config.inc.php")) throw new Exception("Failed to include 'script.php'");
  </code></pre>
  
  <p>and check whether class exist </p>
  
  <pre><code>if (class_exists('dompdf'))
       { 
          echo "class exist";
       }
       else{
          echo "does not exist";
       }
  
   if (is_file("../assets/converter/dompdf/dompdf_config.inc.php"))
      {
          echo "PATH is CORRECT";
          require_once("../assets/converter/dompdf/dompdf_config.inc.php");
      }
  </code></pre>
  
  <p>now the output </p>
  
  <pre><code>      does not exist PATH is CORRECT
        Fatal error: Class 'DOMPDF' not found in            
         C:\xampp\htdocs\Rental\view\createMRA.php on line 83
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <p>I'm able to download a corrupt pdf why so?</p>
  
  <pre><code>        Fatal error: Class 'Font' not found in C:\xampp\htdocs\Rental\assets\converter\dompdf\include\font_metrics.cls.php on line 346
  </code></pre>