title: Unable to generate pdf using DOMPDF
body: <p>I have a php file which saves two images into server and creating a pdf of this saved images using dompdf. I am able to save the images into particular folder but not able to generate pdf. could someone tell me what am doing wrong here? Here is my code.</p>
  
  <pre><code>&lt;?php
  
   ini_set('display_errors', 1);
   error_reporting(E_ALL ^ E_NOTICE);
   $data1 = $_POST['data1'];
   $data2 = $_POST['data2'];
  
   if(isset($data1)) {
   $uri1 =  substr($data1,strpos($data1,",")+1);
   $uri2 =  substr($data2,strpos($data2,",")+1);
  
   $path =$_SERVER["DOCUMENT_ROOT"].'/divya/custom_product/sites/default/files/cart';
   $id = "test";
   $type ="order";
   $file1 = $path .'/'.$id.'-'.$type.'1.png';
   $file2 = $path .'/'.$id.'-'.$type.'2.png';
  
   $a=base64_decode($uri1);
   $b=base64_decode($uri2);
  
   file_put_contents($file1, $a);
   file_put_contents($file2, $b);
   }
   ?&gt;
   &lt;?php
   require_once("dompdf_config.inc.php");
   require_once("sites/all/modules/print/lib/dompdf/dompdf_config.inc.php");
  
  
   $tbl = '&lt;html style="margin:20px 20px 0px; padding:0;"&gt;
   &lt;body style="margin:0; padding:0;"&gt;
  
   &lt;table style="margin:0px 0px 5px 3px;"&gt;
   &lt;tr&gt;
   &lt;td style="width:220px;vertical-align:top;"&gt;'.$file1.'&lt;/td&gt;
   &lt;td style="width:220px;vertical-align:top;"&gt;'.$file2.'&lt;/td&gt;
   &lt;/tr&gt;
   &lt;/table&gt;
  
   &lt;/body&gt;
   &lt;/html&gt;';
   $dompdf = new DOMPDF;
   $dompdf-&gt;load_html($tbl);
   $dompdf-&gt;render();
   $pdfoutput = $dompdf-&gt;output();
   //  Checks whether there is an output folder inside sites/default/files
   if (!is_dir('public://output')) {
   mkdir("public://output", 0777);
   //  Creates a folder and changes its permissions}
   $filename = 'sites/default/files/output/' . 'sample.pdf'
   $fp = fopen($filename, "w+");
   fwrite($fp, $pdfoutput);
   //  Writes the pdf output to a file
   fclose($fp);
   ?&gt;
  </code></pre>