title: mpdf invoice not generating as I want it
body: <p>This is the coding I am using to generate pdf invoice, I am using jquery to load div content of a php page inside $html, but it is not loading at all. I tried using hidden fields and javascript but none are working. </p>
  
  <pre><code>&lt;?php
  
  include("mpdf/mpdf.php");
  
  
  
  $mpdf=new mPDF('win-1252','A4','','',20,15,48,25,10,10);
  $mpdf-&gt;useOnlyCoreFonts = true;    // false is default
  $mpdf-&gt;SetProtection(array('print'));
  $mpdf-&gt;SetTitle("Acme Trading Co. - Invoice");
  $mpdf-&gt;SetAuthor("Acme Trading Co.");
  $mpdf-&gt;SetWatermarkText("Paid");
  $mpdf-&gt;showWatermarkText = true;
  $mpdf-&gt;watermark_font = 'DejaVuSansCondensed';
  $mpdf-&gt;watermarkTextAlpha = 0.1;
  $mpdf-&gt;SetDisplayMode('fullpage');
  
  $html = '
  &lt;html&gt;
  &lt;head&gt;
  &lt;style&gt;
  body {font-family: sans-serif;
     font-size: 10pt;
   }
  p {    margin: 0pt;
  }
  td { vertical-align: top; }
  .items td {
   border-left: 0.1mm solid #000000;
  border-right: 0.1mm solid #000000;
  }
  table thead td { background-color: #EEEEEE;
  text-align: center;
  border: 0.1mm solid #000000;
  }
  .items td.blanktotal {
  background-color: #FFFFFF;
  border: 0mm none #000000;
  border-top: 0.1mm solid #000000;
  border-right: 0.1mm solid #000000;
  }
  .items td.totals {
  text-align: right;
  border: 0.1mm solid #000000;
  }
  &lt;/style&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;!--mpdf
  &lt;htmlpageheader name="myheader"&gt;
   &lt;table width="100%"&gt;&lt;tr&gt;
   &lt;td width="50%" style="color:#0000BB;"&gt;&lt;span style="font-weight: bold; font-size:     14pt;"&gt;Acme Trading Co.&lt;/span&gt;&lt;br /&gt;123 Anystreet&lt;br /&gt;Your City&lt;br /&gt;GD12 4LP&lt;br /&gt;&lt;span style="font-size: 15pt;"&gt;&amp;#9742;&lt;/span&gt; 01777 123 567&lt;/td&gt;
   &lt;td width="50%" style="text-align: right;"&gt;Invoice No.&lt;br /&gt;&lt;span style="font-weight: bold; font-size: 12pt;"&gt;0012345&lt;/span&gt;&lt;/td&gt;
   &lt;/tr&gt;&lt;/table&gt;
   &lt;/htmlpageheader&gt;
  
  &lt;htmlpagefooter name="myfooter"&gt;
  &lt;div style="border-top: 1px solid #000000; font-size: 9pt; text-align: center;   padding-top: 3mm; "&gt;
  Page {PAGENO} of {nb}
  &lt;/div&gt;
  &lt;/htmlpagefooter&gt;
  
  &lt;sethtmlpageheader name="myheader" value="on" show-this-page="1" /&gt;
  &lt;sethtmlpagefooter name="myfooter" value="on" /&gt;
  mpdf--&gt;
  
  &lt;div style="text-align: right"&gt;Date: '.date('jS F Y').'&lt;/div&gt;
  
  &lt;table width="100%" style="font-family: serif;" cellpadding="10"&gt;
  &lt;tr&gt;
  &lt;td width="45%" style="border: 0.1mm solid #888888;"&gt;&lt;span style="font-size: 7pt;   color: #555555; font-family: sans;"&gt;SOLD TO:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;345 Anotherstreet&lt;br   /&gt;Little Village&lt;br /&gt;Their City&lt;br /&gt;CB22 6SO&lt;/td&gt;
  &lt;td width="10%"&gt;&amp;nbsp;&lt;/td&gt;
  &lt;td width="45%" style="border: 0.1mm solid #888888;"&gt;&lt;span style="font-size: 7pt; color: #555555; font-family: sans;"&gt;SHIP TO:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;345 Anotherstreet&lt;br /&gt;Little Village&lt;br /&gt;Their City&lt;br /&gt;CB22 6SO&lt;/td&gt;
  &lt;/tr&gt;
   &lt;/table&gt;
  
          **&lt;div style="font-size:9px" id="serviced"&gt;&lt;b&gt;Service :&lt;/b&gt;&lt;/div&gt;
          &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
  $("#serviced").load("http://website.com/service.php #serviced")
  })
  &lt;/script&gt;**
          &lt;div style="font-size:9px" id="tratyped"&gt;&lt;b&gt;Type of Transport :&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="custyped"&gt;&lt;b&gt;Type of Client&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="datepickerd"&gt;&lt;b&gt;Date :&lt;/b&gt;&lt;/div&gt;
          &lt;div  style="font-size:9px;display:none" id="timed"&gt;&lt;b&gt;Time :&lt;/b&gt;&lt;/div&gt;
          &lt;div  style="font-size:9px" id="departured"&gt;&lt;b&gt;Departure Address :&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="destinationd"&gt;&lt;b&gt;Arrival Address&lt;/b&gt;&lt;/div&gt;
  
          &lt;div style="font-size:9px" id="passengerd"&gt;&lt;b&gt;No. of Passengers :&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="shairwelld"&gt;&lt;b&gt;No. of Chariwells :&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="babycd"&gt;&lt;b&gt;No. of Baby Chairs :&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="companiond"&gt;&lt;b&gt;No. of Companions :&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="luggaged"&gt;&lt;b&gt;No. of Luggages :&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="petd"&gt;&lt;b&gt;No. of Pets :&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="waitingd"&gt;&lt;b&gt;Waiting Time :&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="insuranced"&gt;&lt;b&gt;Insurance :&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="stopd"&gt;&lt;b&gt;Stop in Way :&lt;/b&gt;&lt;/div&gt;
  
          &lt;div style="font-size:9px" id="dis"&gt;&lt;b&gt;Distance(app) :&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="tim"&gt;&lt;b&gt;Time(app) :&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="ht"&gt;&lt;b&gt;PRICE (HT) :&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="vat"&gt;&lt;b&gt;VAT :&lt;/b&gt;&lt;/div&gt;
          &lt;div style="font-size:9px" id="ttc"&gt;&lt;b&gt;PRICE (TTC) :&lt;/b&gt;&lt;/div&gt;
  
  
  &lt;div style="text-align: center; font-style: italic;"&gt;Payment terms: payment due in 28 days&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  ';
  
  
  
  $mpdf-&gt;WriteHTML($html);
  
  $mpdf-&gt;Output(); exit;
  
  exit;
  
  ?&gt;
  </code></pre>
  
  <p>I have bolded out the code where I am facing problem. </p>
  
  <pre><code>**&lt;div style="font-size:9px" id="serviced"&gt;&lt;b&gt;Service :&lt;/b&gt;&lt;/div&gt;
      &lt;script type="text/javascript"&gt;
   $(document).ready(function(){
  $("#serviced").load("http://website.com/service.php #serviced")
  })
  &lt;/script&gt;**
  </code></pre>
  
  <p>I am trying to load the div content of a php page inside the $html in the above code, but it is not loading. I have tried everything I could but no luck so far. </p>
  
  <p>Please help me with the code or suggestions. </p>
  
  <p>Thanks!</p>