title: render HTML from PHP using FPDF
body: <p>having some problems rendering html when I convert to PDF. It's driving me mental and I don't know what's going on. The idea is that I have an html form in a mysql database which stores HTML tags and what not, I pull it out using PHP, render the HTML and display it as a PDF. My issue is that it won't render the HTML. it's just text and the formatting is way off. Here is the code I have so far:</p>
  
  <pre><code>$indemResult = mysqli_query($conn,"SELECT * FROM Indemnity");
  $indemRow = mysqli_fetch_array($indemResult);
  require('../include/PDFConverter/fpdf.php');
  $pdf = new PDF();
  $pdf-&gt;SetMargins(0,0,0);
  $pdf-&gt;AddPage();
  $pdf-&gt;SetFont('Arial','',12);
  
  //Insert Banner
  $pdf-&gt;Image('../assets/pdfBanner.png');
  $pdf-&gt;Ln();
  $pdf-&gt;Ln();
  
  //Insert Indemnity form
  $pdf-&gt;SetXY(50, 65);
  $pdf-&gt;cMargin = 10;
  $pdf-&gt;SetFont('Arial','',24);
  $pdf-&gt;Cell(0, 10, $pdf-&gt;Write(1,'Indemnity Form'), 0, 1,'C', false);
  
  $pdf-&gt;SetFont('Arial','',12);
  $text=$pdf-&gt;WriteHTML(utf8_decode($indemRow['form']));
  $wrap=$pdf-&gt;WordWrap($text,120);
  $pdf-&gt;MultiCell(0,0,$pdf-&gt;Write($wrap, ''));
  </code></pre>