Usually it is $pdf->Cell(0, $height, "text", 0, 0, 'C'); but if you do this in the header or footer function, this is $this->Cell(0, $height, "text", 0, 0, 'C') . Do not forget to declare $height global, if you do it in the function call ().
source share