Does anyone could help me how to fix this kind of error in html2pdf. Actually I simply copy the sample code for me to test but id doesn't work. thanks in advance here is the error Fatal error: Call to undefined method HTML2FPDF:isplayPreferences() in C:\xampp\htdocs\infinity_other\html2pdf\html2fpdf.php on line 155 <? require('html2pdf/html2fpdf.php'); $pdf=new HTML2FPDF(); $pdf->AddPage(); $fp = fopen("sample.html","r"); $strContent = fread($fp, filesize("sample.html")); fclose($fp); $pdf->WriteHTML($strContent); $pdf->Output("sample.pdf"); echo "PDF file is generated successfully!"; ?> PHP:
Well, I am going to take a guess here. The html2fpdf.php file calls the DisplayPreferences method defined in the fpdf.php file. Is the fpdf.php file in the same directory as the html2fpdf.php file? Just a thought. Also, if you have a PHP debugger set a breakpoint and you will discover why the code does not work.