Clase para crear un PDF.
require_once('pdf/html2fpdf.php');
// ACTIVAR UN BUFFER
ob_start();
Content HTML
// Variable con el buffer
$html=ob_get_contents();
// limipiando el buffer
ob_end_clean();
$pdf = new HTML2FPDF();
$pdf->AddPage();
$pdf->WriteHTML($html);
$pdf->Output('miprimerpdf.pdf','I');
