// Method accepting or not automatic page break if ($this->col < 2) { // Go to next column $this->SetCol($this->col + 1); // Set ordinate to top $this->SetY($this->y0); // Keep on page return false; } else { // Go back to first column $this->SetCol(0); // Page break return true; } } } $pdf = new PDF(); $title = $com->GetDescripEncabezadoPDF($categoria); $pdf->SetTitle($title); $pdf->SetAuthor('Seguros Medicos Internacionales'); $header = array('Beneficio', 'Cobertura'); $data = array(); $beneficiosCoberturas = $com->FillCoberturasBeneficioByCategoria($categoria); //obtenemos las coberturas. foreach ($beneficiosCoberturas as $k => $row) { $data[] = array($row[0], $row[1]); } $pdf->SetFont('Arial', '', 5); $pdf->AddPage(); $pdf->BuildTable($header, $data); $pdf->Output();