{"id":5720,"date":"2014-04-06T10:29:21","date_gmt":"2014-04-06T10:29:21","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/06\/php-fpdf-html2pdf-writehtml-is-an-undefined-method-collection-of-common-programming-errors\/"},"modified":"2014-04-06T10:29:21","modified_gmt":"2014-04-06T10:29:21","slug":"php-fpdf-html2pdf-writehtml-is-an-undefined-method-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/06\/php-fpdf-html2pdf-writehtml-is-an-undefined-method-collection-of-common-programming-errors\/","title":{"rendered":"PHP FPDF html2pdf WriteHTML is an undefined method-Collection of common programming errors"},"content":{"rendered":"<p>So I&#8217;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 &#8220;WriteHTML()&#8221; it gives me this message: Fatal error: &#8216;Call to undefined method FPDF::WriteHTML() in C:\\xampp\\htdocs\\test.php on line 10&#8217;. Here is the code if someone could help me I would appreciate it greatly:<\/p>\n<pre><code>require('html2pdf.php');\n\n\n$pdf = new FPDF('P','mm','A4'); \/\/creating pdf\n$pdf-&gt;AddPage('l');\n\n$output = \"<strong>Testing<\/strong> test\";\n$pdf-&gt;SetFont('Arial','B',16);\n$pdf-&gt;WriteHTML($output);\n$pdf-&gt;Output();\n<\/code><\/pre>\n<p>If no one can find the problem with this code I am also open to suggestions on other ways to get this to work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I&#8217;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 &#8220;WriteHTML()&#8221; it gives me this message: Fatal error: &#8216;Call to undefined method FPDF::WriteHTML() in C:\\xampp\\htdocs\\test.php on line 10&#8217;. Here is the code [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5720","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5720"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5720\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}