Exemplo n.º 1
0
                $this->Cell(47, 6, $col, 1);
            }
            $this->Ln();
        }
    }
    // Page header
    function Header()
    {
        // Logo
        $this->Image('../vista/default/images/logo.png', 10, 6, 30);
        // Arial bold 15
        $this->SetFont('Arial', 'B', 15);
        // Move to the right
        $this->Cell(80);
        // Title
        $this->Cell(30, 10, 'Ingresos ultimo 7 dias', 0, 0, 'C');
        // Line break
        $this->Ln(20);
    }
}
$pdf = new PDF();
// Column headings
$header = array('Cantidad', 'Producto', 'Fecha', 'Observacion');
// Data loading
//$data = $pdf->LoadData('countries.txt');
$modelo = new Compra();
$data = $modelo->listadoSemana();
$pdf->SetFont('Arial', '', 14);
$pdf->AddPage();
$pdf->BasicTable($header, $data);
$pdf->Output();