title: text overlapping at start of pdf when table row exceeds the length of the page
body: <p>I am attaching the pdf1.php which contain the code for rendering the data to a pdf. Data is represented in tables dynamically through database. Since the data is dynamic the table rows may extend to a new page which leads to the overlapping of text at the start of the pdf. I tried placing the table row in a div but it doesn't work. Any help would be appreciable.</p>
  
  <pre><code>&lt;?php
  require_once("dompdf_config.inc.php");
  include('../DBConnect.php');
  session_start();
  $year=$_SESSION['pbasYear'];
  $user = $_SESSION['username'];
  
  //Select query for general information
  $sqlgen="SELECT * from gen_info where user_id='$user'";
                  $genresult=mysqli_query($con,$sqlgen) or die('Error'.mysqli_error($con));
                  $genrow=mysqli_fetch_array($genresult);
                  $name=$genrow['Gen_Info_Name'];
                  $fname=$genrow['Gen_Info_Fname'];
                  $mname=$genrow['Gen_Info_Mname'];
                 $dept=$genrow['Gen_Info_Department'];
                  $cd=$genrow['Gen_Info_CD'];
                  $gp=$genrow['Gen_Info_GP'];
                  $dlp=$genrow['Gen_Info_DLP'];
                  $afc=$genrow['Gen_Info_AFC'];
                  $pa=$genrow['Gen_Info_PA'];
                  $tno=$genrow['Gen_Info_TNO'];
                  $email=$genrow['Gen_Info_Email'];
  
  //Select query for academic activity
  $sqlacad="SELECT * FROM acad_act where user_id='$user' and year='$year'";
                  $acadresult = mysqli_query($con,$sqlacad) or die('Error'.mysqli_error($con));
                  $acresult = mysqli_query($con,$sqlacad) or die('Error'.mysqli_error($con));
                  $acrw=mysqli_fetch_array($acresult);
  
                  if($acrw&gt;0)
                  {
  
                      $acno="Yes";
  
                  }
                  else
                  {
                      $acno="No";
                  }   
  
  //Select query for Lectures, Seminar,Tutorial, Practical, Contact Hours
  $sqllstp="SELECT * from teach_lstp where user_id='$user' and year='$year'";
                  $lstpresult=mysqli_query($con , $sqllstp) or die('Error'.mysqli_error($con));
                  $lstpapi=mysqli_fetch_array($lstpresult);
  
  //Select query for Reading/Instructional material consulted and additional knowledge resources provided to students
  
  $sqlrimc="SELECT * from teach_rimc where user_id='$user' and year='$year'";
                  $rimcresult=mysqli_query($con , $sqlrimc) or die('Error'.mysqli_error($con));
  
  
  //Select query for Use of Participatory and innovative Teaching-Learning Methodologies, Updating of subject contents
  
  $sqltlm="SELECT * from teach_tlm where user_id='$user' and year='$year'";
                  $tlmresult=mysqli_query($con , $sqltlm) or die('Error'.mysqli_error($con));
  
  //Select query for  Examination Duties Assigned and Performed 
  
  $sqledap="SELECT * from teach_edap where user_id='$user' and year='$year'";
                  $edapresult=mysqli_query($con , $sqledap) or die('Error'.mysqli_error($con));
  
  
   //Select query for (i) Extension, Co-curricular &amp; Field based activities.
  
  $sqlecfa="SELECT * from teach_ecfa where user_id='$user' and year='$year'";
                  $ecfaresult=mysqli_query($con , $sqlecfa) or die('Error'.mysqli_error($con));
  
  
  //Select query for Contribution to Corporate Life and Management of the Institution.
  
  $sqlclmi="SELECT * from teach_clmi where user_id='$user' and year='$year'";
                  $clmiresult=mysqli_query($con , $sqlclmi) or die('Error'.mysqli_error($con));
  
  
  //Select query for Professional Development Activities.
  
  $sqlpda="SELECT * from teach_pda where user_id='$user' and year='$year'";
                  $pdaresult=mysqli_query($con , $sqlpda) or die('Error'.mysqli_error($con));
  
  
  //Select query for Published Papers in Journals.
  
  $sqlppij="SELECT * from teach_ppij where user_id='$user' and year='$year'";
                  $ppijresult=mysqli_query($con , $sqlppij) or die('Error'.mysqli_error($con));
  
  
  //Select query for Articles/ Chapters published in Books.                 
  
  $sqlapb="SELECT * from teach_apb where user_id='$user' and year='$year'";
                  $apbresult=mysqli_query($con , $sqlapb) or die('Error'.mysqli_error($con));
  
  
  //Select query for Full papers in Conference Proceedings. 
  
  $sqlfcp="SELECT * from teach_fcp where user_id='$user' and year='$year'";
                  $fcpresult=mysqli_query($con , $sqlfcp) or die('Error'.mysqli_error($con));
  
  
  
  // Select query for Books published as single author or as editor. 
  
  $sqlbpe="SELECT * from teach_bpe where user_id='$user' and year='$year'";
                  $bperesult=mysqli_query($con , $sqlbpe) or die('Error'.mysqli_error($con));
  
  
  // Select query for Ongoing Projects/ Consultancies.
  
  $sqlopc="SELECT * from teach_opc where user_id='$user' and year='$year'";
                  $opcresult=mysqli_query($con , $sqlopc) or die('Error'.mysqli_error($con));
  
  
  // Select query for Completed Projects/ Consultancies.
  
  $sqlcpc="SELECT * from teach_cpc where user_id='$user' and year='$year'";
                  $cpcresult=mysqli_query($con , $sqlcpc) or die('Error'.mysqli_error($con));
  
  
  // Select query for Completed Projects/ Consultancies.
  
  $sqlrg="SELECT * from teach_rg where user_id='$user' and year='$year'";
                  $rgresult=mysqli_query($con , $sqlrg) or die('Error'.mysqli_error($con));
  
  
  // Select query for Training Courses, Teaching-Learning-Evaluation Technology, Faculty Development Programmes
  
  $sqlfdp="SELECT * from teach_fdp where user_id='$user' and year='$year'";
                  $fdpresult=mysqli_query($con , $sqlfdp) or die('Error'.mysqli_error($con));
  
  
  // Select query for  Papers presented in Conferences, Seminars, Workshops, Symposia
  
  $sqlppc="SELECT * from teach_ppc where user_id='$user' and year='$year'";
                  $ppcresult=mysqli_query($con , $sqlppc) or die('Error'.mysqli_error($con));
  
  
  //Select query for Invited Lectures and Chairmanship at National or International Conference/ Seminar
  
  $sqlilc="SELECT * from teach_ilc where user_id='$user' and year='$year'";
                  $ilcresult=mysqli_query($con , $sqlilc) or die('Error'.mysqli_error($con));
  
  
  
  //Calculation of Summary of API.
  
  
              $get1 = mysqli_query($con, "select sum(Teach_LSTP_CTAPI) as value_sum  from Teach_LSTP where user_id='$user' and year='$year'");
                    $row1 = mysqli_fetch_assoc($get1); 
                    $lstp1 = $row1['value_sum'];
  
                    $get2 = mysqli_query($con, "select sum(Teach_LSTP_TLAPI) as value_sum  from Teach_LSTP where user_id='$user' and year='$year'");
                    $row2 = mysqli_fetch_assoc($get2); 
                    $lstp2 = $row2['value_sum'];
  
                    $lstp=$lstp1+$lstp2;
  
  
                    $get3 = mysqli_query($con, "select sum(Teach_TLM_API) as value_sum  from Teach_TLM where user_id='$user' and year='$year'");
                    $row3 = mysqli_fetch_assoc($get3); 
                    $tlm = $row3['value_sum'];
  
  
                    $get4 = mysqli_query($con, "select sum(Teach_EDAP_API) as value_sum  from Teach_EDAP where user_id='$user' and year='$year'");
                    $row4 = mysqli_fetch_assoc($get4); 
                    $edap = $row4['value_sum'];
  
  
                    $teachinglearning=$lstp+$tlm+$edap;
  
  
              $get5 = mysqli_query($con, "select sum(Teach_ECFA_API) as value_sum  from Teach_ECFA where user_id='$user' and year='$year'");
              $row5 = mysqli_fetch_assoc($get5); 
              $ecfa = $row5['value_sum'];
  
              $get6 = mysqli_query($con, "select sum(Teach_CLMI_API) as value_sum  from Teach_CLMI where user_id='$user' and year='$year'");
              $row6 = mysqli_fetch_assoc($get6); 
              $clmi = $row6['value_sum'];
  
              $get7 = mysqli_query($con, "select sum(Teach_PDA_API) as value_sum  from Teach_PDA where user_id='$user' and year='$year'");
              $row7 = mysqli_fetch_assoc($get7); 
              $pda = $row7['value_sum'];
  
              $CoCurricular=$ecfa+$clmi+$pda;
  
          $sum=$teachinglearning+$CoCurricular;
  
          $get8 = mysqli_query($con, "select sum(Teach_PPIJ_API) as value_sum  from Teach_PPIJ where user_id='$user' and year='$year'");
          $row8 = mysqli_fetch_assoc($get8); 
          $ppij = $row8['value_sum']; 
  
          $get9 = mysqli_query($con, "select sum(Teach_APB_API) as value_sum  from Teach_APB where user_id='$user' and year='$year'");
          $row9 = mysqli_fetch_assoc($get9); 
          $apb = $row9['value_sum'];  
  
          $get10 = mysqli_query($con, "select sum(Teach_FCP_API) as value_sum  from Teach_FCP where user_id='$user' and year='$year'");
          $row10 = mysqli_fetch_assoc($get10); 
          $fcp = $row10['value_sum']; 
  
          $get11 = mysqli_query($con, "select sum(Teach_BPE_API) as value_sum  from Teach_BPE where user_id='$user' and year='$year'");
          $row11 = mysqli_fetch_assoc($get11); 
          $bpe= $row11['value_sum'];  
  
          $get12 = mysqli_query($con, "select sum(Teach_OPC_API) as value_sum  from Teach_OPC where user_id='$user' and year='$year'");
          $row12 = mysqli_fetch_assoc($get12); 
          $opc = $row12['value_sum']; 
  
          $get13 = mysqli_query($con, "select sum(Teach_CPC_API) as value_sum  from Teach_CPC where user_id='$user' and year='$year'");
          $row13 = mysqli_fetch_assoc($get13); 
          $cpc = $row13['value_sum']; 
  
          $get14 = mysqli_query($con, "select sum(Teach_RG_API) as value_sum  from Teach_RG where user_id='$user' and year='$year'");
          $row14 = mysqli_fetch_assoc($get14); 
          $rg = $row14['value_sum'];  
  
          $get15 = mysqli_query($con, "select sum(Teach_FDP_API) as value_sum  from Teach_FDP where user_id='$user' and year='$year'");
          $row15 = mysqli_fetch_assoc($get15); 
          $fdp = $row15['value_sum']; 
  
          $get16 = mysqli_query($con, "select sum(Teach_PPC_API) as value_sum  from Teach_PPC where user_id='$user' and year='$year'");
          $row16 = mysqli_fetch_assoc($get16); 
          $ppc = $row16['value_sum']; 
  
          $get17 = mysqli_query($con, "select sum(Teach_ILC_API) as value_sum  from Teach_ILC where user_id='$user' and year='$year'");
          $row17 = mysqli_fetch_assoc($get17); 
          $ilc = $row17['value_sum']; 
  
          $research=$ppij+$apb+$fcp+$bpe+$opc+$cpc+$rg+$fdp+$ppc+$ilc;                
  
  
   /*General Information Table */
    $html =
      '&lt;html&gt;&lt;body&gt;'.
      '&lt;h3&gt;&lt;center&gt;University of Indore&lt;/center&gt;&lt;/h3&gt;&lt;br/&gt;'.
      '&lt;h3&gt;&lt;center&gt;Devi Ahilya University, Indore&lt;/center&gt;&lt;/h3&gt;&lt;br/&gt;'.
      '&lt;h4&gt;&lt;center&gt;Annual Self-Assessment for the Performance Based Appraisal System (PBAS)&lt;/center&gt;&lt;/h4&gt;&lt;br/&gt;'.
      '&lt;h4&gt;&lt;center&gt;Session/Year :'.$year.' &lt;/center&gt;&lt;/h4&gt;&lt;br/&gt;'.
      '&lt;h3&gt;&lt;center&gt;PART A : GENERAL INFORMATION&lt;/center&gt;&lt;/h3&gt;&lt;br/&gt;'.
      '&lt;table border="1px" width="100%"&gt;&lt;tr&gt;&lt;th&gt;Name&lt;/th&gt;&lt;td&gt;'.$name.'&lt;/td&gt;&lt;/tr&gt;'.
      '&lt;tr&gt;&lt;th&gt;Father`s Name&lt;/th&gt;&lt;td&gt;'.$fname.'&lt;/td&gt;&lt;/tr&gt;'.
      '&lt;tr&gt;&lt;th&gt;Mother`s Name&lt;/th&gt;&lt;td&gt;'.$mname.'&lt;/td&gt;&lt;/tr&gt;'.
      '&lt;tr&gt;&lt;th&gt;Department&lt;/th&gt;&lt;td&gt;'.$dept.'&lt;/td&gt;&lt;/tr&gt;'.
      '&lt;tr&gt;&lt;th&gt;Current Designation&lt;/th&gt;&lt;td&gt;'.$cd.'&lt;/td&gt;&lt;/tr&gt;'.
      '&lt;tr&gt;&lt;th&gt;Grade Pay&lt;/th&gt;&lt;td&gt;'.$gp.'&lt;/td&gt;&lt;/tr&gt;'.
      '&lt;tr&gt;&lt;th&gt;Date of Last Promotion&lt;/th&gt;&lt;td&gt;'.$dlp.'&lt;/td&gt;&lt;/tr&gt;'.
      '&lt;tr&gt;&lt;th&gt;Address for Correspondance&lt;/th&gt;&lt;td&gt;'.$afc.'&lt;/td&gt;&lt;/tr&gt;'.
      '&lt;tr&gt;&lt;th&gt;Permanent Address&lt;/th&gt;&lt;td&gt;'.$pa.'&lt;/td&gt;&lt;/tr&gt;'.
      '&lt;tr&gt;&lt;th&gt;Contact No.&lt;/th&gt;&lt;td&gt;'.$tno.'&lt;/td&gt;&lt;/tr&gt;'.
      '&lt;tr&gt;&lt;th&gt;Email&lt;/th&gt;&lt;td&gt;'.$email.'&lt;/td&gt;&lt;/tr&gt;'.
      '&lt;/table&gt;';
  
  /*Academic activity table    */
  
      $acrow = mysqli_fetch_array($acresult);
      $html.=
  
      '&lt;br&gt;&lt;B&gt;Whether acquired any degree or fresh academic qualification during the year : '.$acrow['Gen_Info_AQ'].''.
      '&lt;br&gt;&lt;B&gt;Whether acquired any degree or fresh academic qualification during the year: '.$acno.''.
      '&lt;br&gt;&lt;table width="100%" border="1px"&gt;'.
      '&lt;tr&gt;&lt;th&gt;Name of Course&lt;/th&gt;&lt;th&gt;Place&lt;/th&gt;&lt;th&gt;Duration&lt;/th&gt;&lt;th&gt;Sponsoring Agency&lt;/th&gt;&lt;/tr&gt;';
     while($acadrow = mysqli_fetch_array($acadresult)){
      $html .='&lt;tr&gt;&lt;th&gt;'.$acadrow['Gen_Info_Noc'].'&lt;/th&gt;&lt;th&gt;'.$acadrow['Gen_Info_Place'].'&lt;/th&gt;&lt;th&gt;'.$acadrow['Gen_Info_Duration'].'&lt;/th&gt;&lt;th&gt;'.$acadrow['Gen_Info_SA'].'&lt;/th&gt;&lt;/tr&gt;';}
  
      $html.='&lt;/table&gt;&lt;br/&gt;&lt;h3&gt;&lt;b&gt;&lt;center&gt;PART B : ACADEMIC PERFORMACE INDICATORS&lt;/center&gt;&lt;/b&gt;&lt;/h3&gt;&lt;br/&gt;'.
  
  
  /*CATEGORY  I : TEACHING LEARNING AND EVALUATION RELATED ACTIVITES*/
  
  /*LSTP Table*/    
  
      '&lt;h3&gt;&lt;center&gt;&lt;b&gt;CATEGORY  I : TEACHING LEARNING AND EVALUATION RELATED ACTIVITES&lt;/b&gt; &lt;/center&gt;&lt;/h3&gt;&lt;br/&gt;'.
      '&lt;h4&gt;(i) Lecture, Seminar, Tutorial, Practical, Contact Hours (Semester Wise)&lt;/h4&gt;'.
      '&lt;table width="100%" border="1px"&gt;'.
      '&lt;tr&gt;&lt;th&gt;Course/Paper&lt;/th&gt;&lt;th&gt;Level&lt;/th&gt;&lt;th&gt;Mode of Teaching&lt;/th&gt; &lt;th&gt;No. of classes/per week allocated&lt;/th&gt; &lt;th&gt;Total no. of classes conducted&lt;/th&gt; &lt;th&gt;Practicals&lt;/th&gt; &lt;th&gt;% of classes taken as per documented record&lt;/th&gt;&lt;/tr&gt;';
      while($lstprow=mysqli_fetch_array($lstpresult)){
      $html .='&lt;tr&gt;&lt;td&gt;'.$lstprow['Teach_LSTP_Course'].'&lt;/td&gt; &lt;td&gt;'.$lstprow['Teach_LSTP_Level'].'&lt;/td&gt;&lt;td&gt;'.$lstprow['Teach_LSTP_MOT'].'&lt;/td&gt;&lt;td&gt;'.$lstprow['Teach_LSTP_NOCA'].'&lt;/td&gt; &lt;td&gt;'.$lstprow['Teach_LSTP_NOCC'].'&lt;/td&gt; &lt;td&gt;'.$lstprow['Teach_LSTP_Practicals'].'&lt;/td&gt; &lt;td&gt;'.$lstprow['Teach_LSTP_CTDR'].'&lt;/td&gt;&lt;/tr&gt; ';}
  
      $html .='&lt;/table&gt;&lt;br/&gt;&lt;b&gt;&lt;h4&gt;Lecture (L), Seminars (S), Tutorials (T), Practical (P), Contact Hours (C)&lt;/h4&gt;&lt;/b&gt;'.
          '&lt;table border="1px" width="100%"&gt;'.
          '&lt;tr&gt;&lt;th&gt;&lt;/th&gt; &lt;th&gt;&lt;/th&gt; &lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;'.
          '&lt;tr&gt;&lt;th&gt;(a)&lt;/th&gt;&lt;th&gt;Classes Taken (max 50 for 100% performance &amp; Proportionate Score upto 80% performance, below which no score may be given) &lt;/th&gt;&lt;td&gt;'.$lstpapi['Teach_LSTP_CTAPI'].'&lt;/td&gt;&lt;/tr&gt;'.
          '&lt;tr&gt;&lt;th&gt;(b)&lt;/th&gt;&lt;th&gt;Teaching Load in excess of UGC norm (max score:10)&lt;/th&gt;&lt;td&gt;'.$lstpapi['Teach_LSTP_TLAPI'].'&lt;/td&gt;&lt;/tr&gt;'.
  
  /*RIMC Table*/
  
          '&lt;/table&gt;&lt;br/&gt;&lt;h4&gt;(ii) Reading/Instructional material consulted and additional knowledge resources provided to students :&lt;/h4&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Course Paper&lt;/th&gt;&lt;th&gt;Consulted &lt;/th&gt;&lt;th&gt;Prescribed&lt;/th&gt; &lt;th&gt;Additional Resources Provided&lt;/th&gt;&lt;/tr&gt;';
          while($rimcrow = mysqli_fetch_array($rimcresult)){
          $html .='&lt;tr&gt;&lt;th&gt;'.$rimcrow['Teach_RIMC_Course'].'&lt;/th&gt;&lt;th&gt;'.$rimcrow['Teach_RIMC_Consulted'].'&lt;/th&gt;&lt;th&gt;'.$rimcrow['Teach_RIMC_Prescribed'].'&lt;/th&gt;&lt;th&gt;'.$rimcrow['Teach_RIMC_ARP'].'&lt;/th&gt;&lt;/tr&gt;';}
  
  /*TLM Table*/
  
          $html.='&lt;/table&gt;&lt;br/&gt;&lt;h4&gt;(iii) Use of Participatory and innovative Teaching-Learning Methodologies, Updating of subject contents :&lt;/h4&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Short Description&lt;/th&gt;&lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
          while($tlmrow = mysqli_fetch_array($tlmresult)){
          $html .='&lt;tr&gt;&lt;th&gt;'.$tlmrow['Teach_TLM_SD'].'&lt;/th&gt;&lt;th&gt;'.$tlmrow['Teach_TLM_API'].'&lt;/th&gt;&lt;/tr&gt;';}
  
  /*EDAP Table*/ 
  
          $html.='&lt;/table&gt;&lt;br/&gt;&lt;h4&gt;(iv) Examination Duties Assigned and Performed &lt;/h4&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Type of Examination duties&lt;/th&gt;&lt;th&gt;Duties Assigned&lt;/th&gt;&lt;th&gt;Extent to which carried out(%) &lt;/th&gt;&lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
          while($edaprow = mysqli_fetch_array($edapresult)){
          $html .='&lt;tr&gt;&lt;th&gt;'.$edaprow['Teach_EDAP_TED'].'&lt;/th&gt;&lt;th&gt;'.$edaprow['Teach_EDAP_DA'].'&lt;/th&gt;&lt;th&gt;'.$edaprow['Teach_EDAP_ECO'].'&lt;/th&gt;&lt;th&gt;'.$edaprow['Teach_EDAP_API'].'&lt;/th&gt;&lt;/tr&gt;';}      
  
  /*CATEGORY  II : CO-CURRICULAR, EXTENSION, PROFESSIONAL DEVELOPMENT  RELATED  ACTIVITIES */
          $html.='&lt;/table&gt;&lt;br/&gt;&lt;h3&gt;&lt;center&gt;&lt;b&gt;CATEGORY  II : CO-CURRICULAR, EXTENSION, PROFESSIONAL DEVELOPMENT  RELATED  ACTIVITIES &lt;/b&gt; &lt;/center&gt;&lt;/h3&gt;&lt;br/&gt;'.
  
  
  /*ECFA Table*/
  
          '&lt;br/&gt;&lt;h4&gt;(i) Extension, Co-curricular &amp; Field based activities &lt;/h4&gt;&lt;br/&gt;'.
  
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Type of Activity&lt;/th&gt;&lt;th&gt;Average Hrs per Week&lt;/th&gt;&lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
  
          while($ecfarow = mysqli_fetch_array($ecfaresult)){
          $html .='&lt;tr&gt;&lt;th&gt;'.$ecfarow['Teach_ECFA_TOA'].'&lt;/th&gt;&lt;th&gt;'.$ecfarow['Teach_ECFA_AH'].'&lt;/th&gt;&lt;th&gt;'.$ecfarow['Teach_ECFA_API'].'&lt;/th&gt;&lt;/tr&gt;';}      
  
  /*CLMI Table*/
  
          $html.='&lt;/table&gt;&lt;br/&gt;&lt;h4&gt;(ii) Contribution to Corporate Life and Management of the Institution &lt;/h4&gt;&lt;br/&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Type of Activity&lt;/th&gt;&lt;th&gt;Yearly/Semester wise responsibility&lt;/th&gt;&lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
          while($clmirow = mysqli_fetch_array($clmiresult)){
          $html .='&lt;tr&gt;&lt;th&gt;'.$clmirow['Teach_CLMI_TOA'].'&lt;/th&gt;&lt;th&gt;'.$clmirow['Teach_CLMI_YSR'].'&lt;/th&gt;&lt;th&gt;'.$clmirow['Teach_CLMI_API'].'&lt;/th&gt;&lt;/tr&gt;';}      
  
  /*PDA Table*/
  
          $html.='&lt;/table&gt;&lt;br/&gt;&lt;h4&gt;(iii) Professional Development Activities&lt;/h4&gt;&lt;br/&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Type of Activity&lt;/th&gt;&lt;th&gt;Yearly/Semester wise responsibility&lt;/th&gt;&lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
          while($pdarow = mysqli_fetch_array($pdaresult)){
          $html .='&lt;tr&gt;&lt;th&gt;'.$pdarow['Teach_PDA_TOA'].'&lt;/th&gt;&lt;th&gt;'.$pdarow['Teach_PDA_YWR'].'&lt;/th&gt;&lt;th&gt;'.$pdarow['Teach_PDA_API'].'&lt;/th&gt;&lt;/tr&gt;';}      
  
  /*CATEGORY   III : RESEARCH, PUBLICATION AND ACADEMIC CONTRIBUTION*/
  
  
          $html.='&lt;/table&gt;&lt;br/&gt;&lt;br/&gt;&lt;h3&gt;&lt;center&gt;&lt;b&gt;CATEGORY   III : RESEARCH, PUBLICATION AND ACADEMIC CONTRIBUTION&lt;/b&gt; &lt;/center&gt;&lt;/h3&gt;&lt;br/&gt;'.
  
  /*PPIJ Table*/
  
          '&lt;br/&gt;&lt;h4&gt;A) Published Papers in Journals&lt;/h4&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Title with page no.&lt;/th&gt;&lt;th&gt;Journal&lt;/th&gt;&lt;th&gt;ISSN/ISBN No.&lt;/th&gt; &lt;th&gt;Whether peer reviewed.Impact factor,if any&lt;/th&gt; &lt;th&gt;No. of Co.authors&lt;/th&gt; &lt;th&gt;Whether you are the main author&lt;/th&gt; &lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
          while($ppijrow = mysqli_fetch_array($ppijresult)){
          $html.='&lt;tr&gt;&lt;th&gt;'.$ppijrow['Teach_PPIJ_TNO'].'&lt;/th&gt;&lt;th&gt;'.$ppijrow['Teach_PPIJ_Journal'].'&lt;/th&gt; &lt;th&gt;'.$ppijrow['Teach_PPIJ_ISBN'].'&lt;/th&gt; &lt;th&gt;'.$ppijrow['Teach_PPIJ_PR'].'&lt;/th&gt; &lt;th&gt;'.$ppijrow['Teach_PPIJ_NCA'].'&lt;/th&gt; &lt;th&gt;'.$ppijrow['Teach_PPIJ_MA'].'&lt;/th&gt;  &lt;th&gt;'.$ppijrow['Teach_PPIJ_API'].'&lt;/th&gt;&lt;/tr&gt;';}      
  
  /*APB Table*/
  
          $html.='&lt;/table&gt;'.
          '&lt;br/&gt;&lt;h4&gt;B (i) Articles/ Chapters published in Books.&lt;/h4&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Title with page no.&lt;/th&gt;&lt;th&gt;Book Title,editor &amp; publisher&lt;/th&gt;&lt;th&gt;ISSN/ISBN No.&lt;/th&gt; &lt;th&gt;Whether peer reviewed.Impact factor,if any&lt;/th&gt; &lt;th&gt;No. of Co.authors&lt;/th&gt; &lt;th&gt;Whether you are the main author&lt;/th&gt; &lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
          while($apbrow=mysqli_fetch_array($apbresult)){
          $html.='&lt;tr&gt;&lt;th&gt;'.$apbrow['Teach_APB_TNO'].'&lt;/th&gt; &lt;th&gt;'.$apbrow['Teach_APB_BEP'].'&lt;/th&gt; &lt;th&gt;'.$apbrow['Teach_APB_ISSN'].'&lt;/th&gt; &lt;th&gt;'.$apbrow['Teach_APB_WPR'].'&lt;/th&gt; &lt;th&gt;'.$apbrow['Teach_APB_NOC'].'&lt;/th&gt; &lt;th&gt;'.$apbrow['Teach_APB_MA'].'&lt;/th&gt; &lt;th&gt;'.$apbrow['Teach_APB_API'].'&lt;/th&gt;&lt;/tr&gt;';}      
  
  /*FCP Table*/
  
         $html.='&lt;/table&gt;'.
          '&lt;br/&gt;&lt;h4&gt;B(ii) Full papers in Conference Proceedings.&lt;/h4&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Title with page no.&lt;/th&gt;&lt;th&gt;Details of Conference publication&lt;/th&gt;&lt;th&gt;ISSN/ISBN No.&lt;/th&gt; &lt;th&gt;No. of Co.authors&lt;/th&gt; &lt;th&gt;Whether you are the main author&lt;/th&gt; &lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
          while($fcprow=mysqli_fetch_array($fcpresult)){
          $html.='&lt;tr&gt;&lt;th&gt;'.$fcprow['Teach_FCP_TNO'].'&lt;/th&gt; &lt;th&gt;'.$fcprow['Teach_FCP_BEP'].'&lt;/th&gt; &lt;th&gt;'.$fcprow['Teach_FCP_ISSN'].'&lt;/th&gt; &lt;th&gt;'.$fcprow['Teach_FCP_NOC'].'&lt;/th&gt; &lt;th&gt;'.$fcprow['Teach_FCP_MA'].'&lt;/th&gt; &lt;th&gt;'.$fcprow['Teach_FCP_API'].'&lt;/th&gt;&lt;/tr&gt;';}      
  
  /*BPE Table*/
  
          $html.='&lt;/table&gt;'.
          '&lt;br/&gt;&lt;h4&gt;B (iii) Books published as single author or as editor. &lt;/h4&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Title with page no.&lt;/th&gt;&lt;th&gt;Type of Book &amp; Authorship&lt;/th&gt;&lt;th&gt;Publisher &amp; ISSN/ISBN No.&lt;/th&gt; &lt;th&gt;Whether peer reviewed&lt;/th&gt; &lt;th&gt;No. of Co.authors&lt;/th&gt; &lt;th&gt;Whether you are the main author&lt;/th&gt; &lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
          while($bperow=mysqli_fetch_array($bperesult)){
          $html.='&lt;tr&gt;&lt;th&gt;'.$bperow['Teach_BPE_TPN'].'&lt;/th&gt; &lt;th&gt;'.$bperow['Teach_BPE_TBA'].'&lt;/th&gt; &lt;th&gt;'.$bperow['Teach_BPE_PISSN'].'&lt;/th&gt; &lt;th&gt;'.$bperow['Teach_BPE_WPR'].'&lt;/th&gt; &lt;th&gt;'.$bperow['Teach_BPE_NOC'].'&lt;/th&gt; &lt;th&gt;'.$bperow['Teach_BPE_MA'].'&lt;/th&gt; &lt;th&gt;'.$bperow['Teach_BPE_API'].'&lt;/th&gt;&lt;/tr&gt;';}      
  
  /*OPC Table*/
  
          $html.='&lt;/table&gt;&lt;br/&gt;&lt;h4&gt;C) Ongoing and Completed Research projects and consultancies&lt;/h4&gt;'.
          '&lt;h4&gt;Ongoing Projects/ Consultancies.&lt;br/&gt;&lt;/h4&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Title &lt;/th&gt;&lt;th&gt;Agency&lt;/th&gt;&lt;th&gt;Period&lt;/th&gt; &lt;th&gt;Grant/Amount Mobilized(Rs. Lakh)&lt;/th&gt; &lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
          while($opcrow=mysqli_fetch_array($opcresult)){
          $html.='&lt;tr&gt;&lt;th&gt;'.$opcrow['Teach_OPC_Title'].'&lt;/th&gt; &lt;th&gt;'.$opcrow['Teach_OPC_Agency'].'&lt;/th&gt; &lt;th&gt;'.$opcrow['Teach_OPC_Period'].'&lt;/th&gt; &lt;th&gt;'.$opcrow['Teach_OPC_GAM'].'&lt;/th&gt; &lt;th&gt;'.$opcrow['Teach_OPC_API'].'&lt;/th&gt;&lt;/tr&gt;';}      
  
  
  /*CPC Table*/
  
          $html.='&lt;/table&gt;&lt;br/&gt;'.
          '&lt;h4&gt;Completed Projects/ Consultancies.&lt;br/&gt;&lt;/h4&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Title &lt;/th&gt;&lt;th&gt;Agency&lt;/th&gt;&lt;th&gt;Period&lt;/th&gt; &lt;th&gt;Grant/Amount Mobilized(Rs. Lakh)&lt;/th&gt; &lt;th&gt; Whether policy document/Patent as outcome &lt;/th&gt; &lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
          while($cpcrow=mysqli_fetch_array($cpcresult)){
          $html.='&lt;tr&gt;&lt;th&gt;'.$cpcrow['Teach_CPC_Title'].'&lt;/th&gt; &lt;th&gt;'.$cpcrow['Teach_CPC_Agency'].'&lt;/th&gt; &lt;th&gt;'.$cpcrow['Teach_CPC_Period'].'&lt;/th&gt; &lt;th&gt;'.$cpcrow['Teach_CPC_GAM'].'&lt;/th&gt; &lt;th&gt;'.$cpcrow['Teach_CPC_WPD'].'&lt;/th&gt; &lt;th&gt;'.$cpcrow['Teach_CPC_API'].'&lt;/th&gt;&lt;/tr&gt;';}      
  
  
  
  /*RG Table*/
  
          $html.='&lt;/table&gt;'.
          '&lt;br/&gt;&lt;h4&gt;Research Guidance.&lt;br/&gt;&lt;/h4&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Number Enrolled &lt;/th&gt;&lt;th&gt;Thesis Submitted&lt;/th&gt;&lt;th&gt;Degree Awarded&lt;/th&gt; &lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
          while($rgrow=mysqli_fetch_array($rgresult)){
          $html.='&lt;tr&gt;&lt;th&gt;'.$rgrow['Teach_RG_NE'].'&lt;/th&gt; &lt;th&gt;'.$rgrow['Teach_RG_TS'].'&lt;/th&gt; &lt;th&gt;'.$rgrow['Teach_RG_DA'].'&lt;/th&gt; &lt;th&gt;'.$rgrow['Teach_RG_API'].'&lt;/th&gt;&lt;/tr&gt;';}      
  
  
  /*FDP Table*/
  
          $html.='&lt;/table&gt;'.
          '&lt;br/&gt;&lt;h4&gt;E (i) Training Courses, Teaching-Learning-Evaluation Technology, Faculty Development Programmes.&lt;br/&gt;&lt;/h4&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Programme &lt;/th&gt;&lt;th&gt;Duration&lt;/th&gt;&lt;th&gt;Organized By&lt;/th&gt; &lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
          while($fdprow=mysqli_fetch_array($fdpresult)){
          $html.='&lt;tr&gt;&lt;th&gt;'.$fdprow['Teach_FDP_Programme'].'&lt;/th&gt; &lt;th&gt;'.$fdprow['Teach_FDP_Duration'].'&lt;/th&gt; &lt;th&gt;'.$fdprow['Teach_FDP_Organized'].'&lt;/th&gt; &lt;th&gt;'.$fdprow['Teach_FDP_API'].'&lt;/th&gt;&lt;/tr&gt;';}      
  
  
  /*PPC Table*/
  
          $html.='&lt;/table&gt;'.
          '&lt;br/&gt;&lt;h4&gt;E (ii) Papers presented in Conferences, Seminars, Workshops, Symposia.&lt;br/&gt;&lt;/h4&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Title of paper presented &lt;/th&gt;&lt;th&gt;Title of Conference/Seminar etc.&lt;/th&gt;&lt;th&gt;Date of the event&lt;/th&gt; &lt;th&gt; Organized By &lt;/th&gt; &lt;th&gt; Whether International/National/State &lt;/th&gt; &lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
          while($ppcrow=mysqli_fetch_array($ppcresult)){
          $html.='&lt;tr&gt;&lt;th&gt;'.$ppcrow['Teach_PPC_TPP'].'&lt;/th&gt; &lt;th&gt;'.$ppcrow['Teach_PPC_TCS'].'&lt;/th&gt; &lt;th&gt;'.$ppcrow['Teach_PPC_DOE'].'&lt;/th&gt; &lt;th&gt;'.$ppcrow['Teach_PPC_Organized'].'&lt;/th&gt; &lt;th&gt;'.$ppcrow['Teach_PPC_WINS'].'&lt;/th&gt; &lt;th&gt;'.$ppcrow['Teach_PPC_API'].'&lt;/th&gt;&lt;/tr&gt;';}      
  
  
  /*ILC Table*/
  
          $html.='&lt;/table&gt;'.
          '&lt;br/&gt;&lt;h4&gt;E(iii) Invited Lectures and Chairmanship at National or International Conference/ Seminar.&lt;br/&gt;&lt;/h4&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr&gt;&lt;th&gt;Title of the Lecture/Academic Session &lt;/th&gt;&lt;th&gt;Title of Conference/Seminar etc.&lt;/th&gt;&lt;th&gt;Date of the event&lt;/th&gt; &lt;th&gt; Organized By &lt;/th&gt; &lt;th&gt; Whether International/National/State &lt;/th&gt; &lt;th&gt;API Score&lt;/th&gt;&lt;/tr&gt;';
          while($ilcrow=mysqli_fetch_array($ilcresult)){
          $html.='&lt;tr&gt;&lt;th&gt;'.$ilcrow['Teach_ILC_TOL'].'&lt;/th&gt; &lt;th&gt;'.$ilcrow['Teach_ILC_TCS'].'&lt;/th&gt; &lt;th&gt;'.$ilcrow['Teach_ILC_DOE'].'&lt;/th&gt; &lt;th&gt;'.$ilcrow['Teach_ILC_Organized'].'&lt;/th&gt; &lt;th&gt;'.$ilcrow['Teach_ILC_WINS'].'&lt;/th&gt; &lt;th&gt;'.$ilcrow['Teach_ILC_API'].'&lt;/th&gt;&lt;/tr&gt;';}      
          $html.='&lt;/table&gt;&lt;br/&gt;&lt;br/&gt;'.
  
  
  /*Table of API summary */
  
          '&lt;h3&gt;IV. SUMMARY OF API SCORES&lt;/h3&gt;'.
          '&lt;table width="100%" border="1px"&gt;'.
          '&lt;tr align="center"&gt;&lt;th&gt; &lt;/th&gt;&lt;th&gt;Criteria&lt;/th&gt;&lt;th&gt;Last Academic Year&lt;/th&gt; &lt;th&gt; Total API Score for Assessment Period&lt;/th&gt; &lt;th&gt;Annual Average API Score for Assessment Period &lt;/th&gt;&lt;/tr&gt;'.
          '&lt;tr align="center"&gt;&lt;td&gt; I &lt;/td&gt; &lt;td&gt; TEACHING LEARNING AND EVALUATION RELATED ACTIVITIES&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt;'.$teachinglearning.' &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;/tr&gt;'.
          '&lt;tr align="center"&gt;&lt;td&gt;II&lt;/td&gt;&lt;td&gt;CO-CURRICULAR,EXTENSION PROFESSIONAL DEVELOPMENT RELATED ACTIVITIES&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td&gt;'.$CoCurricular.' &lt;/td&gt; &lt;td&gt; &lt;/td&gt;&lt;/tr&gt;'.
          '&lt;tr align="center"&gt;&lt;td&gt; &lt;/td&gt; &lt;td&gt;TOTAL I + II &lt;/td&gt; &lt;td&gt; &lt;/td&gt;&lt;td&gt;'.$sum.' &lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;/tr&gt;'.
          '&lt;tr align="center"&gt;&lt;td&gt; III&lt;/td&gt; &lt;td&gt; RESEARCH,PUBLICATION AND ACADEMIC CONTRIBUTION&lt;/td&gt; &lt;td&gt; &lt;/td&gt; &lt;td&gt;'.$research.' &lt;/td&gt; &lt;td&gt; &lt;/td&gt;&lt;/tr&gt;'.
          '&lt;/table&gt; &lt;br/&gt;&lt;br/&gt;'.
          '&lt;h3&gt;&lt;center&gt;PART C: OTHER RELEVANT INFORMATION&lt;/center&gt;&lt;/h3&gt; &lt;br/&gt; &lt;br/&gt; &lt;br/&gt; &lt;br/&gt;'.
  
  
  /*Footer Detail*/
  
  
          '&lt;h4&gt;I certify that the information provided is correct as per records available with the University and/or documents enclosed along with the duly filled PBAS proforma. &lt;/h4&gt;'.
          '&lt;br/&gt;&lt;div align="right"&gt;&lt;h4&gt;Signature of the faculty&lt;/h4&gt;'.
          '&lt;h4&gt;Designation : '.$cd.'&lt;/h4&gt;'.
          '&lt;h4&gt;Place : Indore&lt;/h4&gt;'.
          '&lt;h4&gt;Date : '.Date("d/m/Y").'&lt;/h4&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;'.
          '&lt;h4&gt;Signature of HOD&lt;/h4&gt;&lt;/div&gt;'.
          '&lt;/body&gt;&lt;/html&gt;'; 
  
  
  
  
  
  $dompdf = new DOMPDF();
  $dompdf-&gt;load_html($html);
  
  $dompdf-&gt;render();
  $dompdf-&gt;stream("PBAS.pdf");
  
  ?&gt;
  </code></pre>