Undefined font: In Fpdf

I'm New to Fpdf library, i need to create a pdf from data base in smarty. i have checked the data from data base is fine, when pass the font name the below error was show

Warning: in_array() expects parameter 2 to be array, null given in /var/www/html/irmt/library/class/fpdf/fpdf.php on line 526
<b>FPDF error:</b> Undefined font: helvetica B

my code is


Please help me how can i solve this problem. thank adv


I think your __construct in the pdf creation is problem, try this one in

    class pdf extends FPDF
      function __construct()

that's because you call the constructor of the fpdf library, change the fpdf library function (parameters) to __ construct (parameters), then spread it from your file. example: file : genpdf.php

class Genpdf extends Fpdf{
    public function __construct()
    public function build()
       $this->Cell(40,10,'¡Hola, Mundo!');

Try to remove the line $pdf->FancyTable($rs); and check if you get the PDF.

Need Your Help

Razor: @Html.Partial() vs @RenderPage()

asp.net-mvc razor renderpartial

What is the appropriate way of rendering a child template?

Canonical way to obtain CDI managed bean instance: BeanManager#getReference() vs Context#get()

cdi managed-bean

I figured that there are two general ways to obtain an auto-created CDI managed bean instance via BeanManager when having solely a Bean&lt;T&gt; to start with (which is created based on Class&lt;T&...