I recently done this by using TCPDF. TCPDF is a further developed version of FPDF.
See this link for an expample regarding converting to PDF. Also, here you can find more examples. Example 61 could also come in quite handy.
Sample code which TCPDF uses:
$html = '<h1>HTML Example</h1>
<div style="text-align:center">IMAGES<br />
<img src="../images/logo_example.png" alt="test alt attribute" width="100" height="100" border="0" /><img src="../images/tiger.ai" alt="test alt attribute" width="100" height="100" border="0" /><img src="../images/logo_example.jpg" alt="test alt attribute" width="100" height="100" border="0" />
</div>';
// output the HTML content
$pdf->writeHTML($html, true, false, true, false, '');