public function Header() { $this->SetFont('Helvetica', 'B', 13); $this->Cell(0, 10, 'EJEMPLO', 0, 1, 'C', 0, '', 1); $header = array('Country', 'Capital', 'Area (sq km)', 'Pop. (thousands)'); Principal::SetColors(); $w = array(40, 35, 40, 45); //Ancho de las columnas $num_headers = count($header); for ($i = 0; $i < $num_headers; $i++) { $this->Cell($w[$i], 7, $header[$i], 1, 0, 'C', 1); } }