Bueno, tengo q crear un pdf a partir de una arreglo de datos, esto se ejecuta al precionar el boton exportar pdf. aca pego el codigo!!
ayuda pls!
Código PHP:
function btn_genera_pdf(){
$arreglo_de_logs = $this->so_logs->informe_logs();
if($_POST['btn_exporta']){
if($arreglo_de_logs != null){
$titles = array(
'id'=>'<b>Codigo</b>',
'accion'=>'<b>Accion</b>',
'url'=>'<b>Direccion</b>',
'fecha'=>'<b>Fecha</b>');
$options = array(
'shadeCol'=>array(0.9,0.9,0.9),
'xOrientation'=>'center',
'width'=>500
);
$txttit = "<b>Probando!!!</b>\n";
//$pdf->ezImage('pato.jpeg', 0,100, 'none');
$this->pdf->ezStartPageNumbers(300,20,15,'','',1);
//$this->pdf->addJpegFromFile("pato.jpeg",50,760,100);
$this->pdf->ezText("\n\n\n", 5);
$this->pdf->ezText($txttit, 18, array('justification' => 'centre'));
$this->pdf->ezText("\n\n\n", 5);
$this->pdf->addText(330,800,10,"Fecha: ".date("d/m/Y"));
$this->pdf->addText(480,800,10,"-".date("H:i")."\n\n");
//$pdf->setLineStyle(1);
//$pdf->line(50,720,550,720);
$this->pdf->ezTable($logs, $titles,'ejemplo', $options);
$this->pdf->ezText("\n\n\n", 10);
$this->pdf->ezStream();
}
}
}
pd: sorry por la tabulacion de las llaves :(
ayuda pls!