PHP FPDF html2pdf WriteHTML is an undefined method-Collection of common programming errors

So I’m trying to get FPDF to bold whenever there is the html tag to do so. I downloaded html2pdf to the file with my website but every time I try to use “WriteHTML()” it gives me this message: Fatal error: ‘Call to undefined method FPDF::WriteHTML() in C:\xampp\htdocs\test.php on line 10’. Here is the code if someone could help me I would appreciate it greatly:

require('html2pdf.php');


$pdf = new FPDF('P','mm','A4'); //creating pdf
$pdf->AddPage('l');

$output = "Testing test";
$pdf->SetFont('Arial','B',16);
$pdf->WriteHTML($output);
$pdf->Output();

If no one can find the problem with this code I am also open to suggestions on other ways to get this to work.