title: HTML to PDF conversion with external CSS support in Codeigniter
body: <p>After comparing the features in dompdf, TCPDF, MPDF, I am using MPDF here to convert HTML to PDF in my codeigniter application. In localhost, its working properly. And pdf is generated within 2 or 3 seconds. When i upload it in live server, it takes more than 3 minutes to create the same pdf file. I have checked with file permissions. Pdf is generating and saved in folder. But it takes large time.</p>
  
  <pre><code>$this-&gt;ci-&gt;load-&gt;library('m_pdf');
  $html = $this-&gt;ci-&gt;load-&gt;view('ecommerce/salespdf',$this-&gt;data,true);
  $m_pdf = $this-&gt;ci-&gt;m_pdf-&gt;load();
  $m_pdf-&gt;WriteHTML($html);
  $filepath = getcwd()."/assets/other_uploads/pdf_files/";
  $m_pdf-&gt;Output($filepath.$filename, "F");
  </code></pre>
  
  <p>From the above code, pdf is generating in the specified folder, but takes long time. Only one external css file is included in the view file.</p>
  
  <pre><code>&lt;link href="&lt;?php echo CSS_URL; ?&gt;pdf-invoice.css" rel="stylesheet" type="text/css" /&gt;
  </code></pre>
  
  <p>Is anything wrong in my code?</p>