<?php


  require_once('pdfSample/print.php');
  $Template = ob_get_clean();
  //include dompdf library
  require_once('dompdf/autoload.inc.php'); 
  use Dompdf\Dompdf;
  //using  pdf dompdf class
  $Dompdf = new Dompdf();
  $Dompdf->loadHtml($Template);
  //set paper size
  $Dompdf->setPaper('A4','Landscape');
  //$Dompdf->setPaper('A4','Portrait');

  //render Html to pdf
  $Dompdf->render();

  //$mat_num = str_replace('/', '-', $mat_num);


  //get the  course ttitle
  $session_title = get_session_title($ses);//passed 
  $session_titlet = str_replace('/','-',$session_title);



  $semester = get_current_semester(1); //deprecated since I am using semester passed from url


  //get the  course ttitle
  $code =  get_student_course_code($course_id);
  $code = str_replace(' ','-',$code);

  $title = $code.'-'.$session_titlet;

  




  




    $Dompdf->stream($title);




?>

        
<?php
          // }
          // else
          // {//show the msg 
          
          //     $output = 
          //          '<div class="alert alert-danger alert-dismissable"> 
          //         <button class="close" aria-hidden="true" data-dismiss="alert" type="button">x</button>
          //         <img src="images/info.png" />&nbsp;&nbsp; No record found in the system.
          //          </div>';
            
            
          // }




          
?>