![Neurótico](http://static.forosdelweb.com/fdwtheme/images/smilies/scared.png)
Código PHP:
Ver original
<?php include_once('fpdf/fpdf.php'); class PDF extends FPDF { // Una tabla más completa function ImprovedTable($header, $data) { // Anchuras de las columnas // Cabeceras $this->Cell($w[$i],7,$header[$i],1,0,'C'); $this->Ln(); // Datos foreach($data as $row) { $this->Cell($w[0],6,$row[0],'LR'); $this->Cell($w[1],6,$row[1],'LR'); $this->Ln(); } // Línea de cierre } } $pdf = new PDF(); $pdf->Open(); $pdf->AddPage(); $pdf->Image('img/cintillo_inst.jpg',5,5,200); $pdf->ln(15); $pdf->SetFont('Arial','',15); $pdf->ln(5); $pdf->SetFont('Arial','B',16); $pdf->Cell(190,15,'Reporte de Solicitudes de Permisos',0,1,'C'); $pdf->SetFont('Arial','',14); $pdf->ImprovedTable($header, $datas); $pdf->ln(); $pdf->SetFont('Arial','B',14); $cadconex="dbname=sspa host=localhost port=5432 user=postgres password=0000"; $sql="select nombre, apellido, gerencia, cargo from empleados"; for ($i=1;$i<=51;$i++){ } } $pdf->ImprovedTable($datas); $pdf->Image('img/pie_pag1.png',30,260,150,30); $pdf->Output(); ?>