title: Failed to Load Pdf Document with TCPDF
body: <p>Now I'm currently working on convert html file to pdf in Zend Framework, I'm using TCPDF for doing this, following is my code.</p>
  
  <pre><code>$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true,    'UTF-8', false);
  $view = new Zend_view();
  $htmlcontent = $view-&gt;render('media-file.phtml');
  $pdf-&gt;AddPage(); 
  $pdf-&gt;writeHTML($htmlcontent, true, 0, true, 0);
  $pdf-&gt;lastPage();
  $pdf-&gt;Output("single-page.pdf", 'D');
  </code></pre>
  
  <p>My problem is file is downloading, but when opened the downloaded file it shows 'Failed to load pdf document'. 
  I don't know where I'm wrong. Please let me Know</p>