Ver Mensaje Individual
  #1 (permalink)  
Antiguo 31/03/2014, 13:46
Avatar de letingel
letingel
 
Fecha de Ingreso: noviembre-2013
Ubicación: neiva
Mensajes: 41
Antigüedad: 10 años, 5 meses
Puntos: 0
tablas fpdf distintas

Buenas tardes.

Requiero ayuda con un pdf realizado con la librería fpdf en php, esta tabla se llena con datos de mysql y dependiendo de la consulta las tablas pueden crecer o no, la cuestión es la siguiente, tengo las dos tablas una a cada lado se supone que deben aumentar filas con respecto a una consulta mysql, pero cuando la una crece modifica la otra es decir no crece solo del lado derecho independientemente sino que cuando crece me baja la otra.

Alguien sabe como puedo dividir el pdf en dos de tal manera que un lado no afecte al otro??

les dejo el link del pdf

http://www.ctrlobra.letingel.com/usu...diario_pdf.php

y aquí les dejo el código

Código PHP:
<?php
include('../../conexion.php');
include(
'fpdf/fpdf.php');
header("Content-Type: text/html; charset=iso-8859-1 ");
class 
PDF extends FPDF
{
function 
Header()
{
//Logo
$this->Image("images/petro.jpg",5,9,35,11,"JPG");
//Arial bold 15
$this->SetFont('Arial','',14);
//Encabezado
$this->Cell(40,10,'',0,0,'r');
$this->Cell(1);
$this->SetFillColor(242,190,3);
$this->Cell(155,10,'REPORTE DIARIO DE ACTIVIDADES',1,0,'C','T');
$this->Ln(15);
$this->SetFont('Arial','',9);
$this->Cell(19,5,'Fecha de reporte:',0,0,'C');
$this->Cell(5,4,'',0,0,'C');
$this->Cell(30,4,'00-00-0000',1,0,'C');
$this->Cell(72);
$this->Cell(1,5,'Contrato / Orden de servicio (#):',0,0,'C');
$this->Ln(6);
$this->SetFont('Arial','',9);
$this->Cell(10,5,'Contratista:',0,0,'C');
$this->Cell(14,4,'',0,0,'C');
$this->Cell(65,4,'LETINGEL S.AS.',1,0,'C');
$this->Cell(15);
$this->Cell(62,4,'',1,0,'C');
$this->Ln(6);
$this->SetFont('Arial','',9);
$this->Cell(11,5,'Proyecto:',0,0,'R');
$this->Cell(13);
$this->Cell(142,4,'',1,0,'L');
$this->Ln(6);
$this->SetFont('Arial','',9);
$this->Cell(9,5,'WA (#):',0,0,'R');
$this->Cell(15);
$this->Cell(55,4,'',1,0,'L');
$this->Cell(68);
$this->Cell(7,4,'Avance programado:',0,0,'C');
$this->Cell(13);
$this->Cell(12,4,'',1,0,'L');
$this->Ln(6);
$this->SetFont('Arial','',9);
$this->Cell(5,5,'AFE:',0,0,'R');
$this->Cell(19);
$this->Cell(55,4,'',1,0,'L');
$this->Cell(68);
$this->Cell(10,4,'Avance real:',0,0,'L');
$this->Cell(10);
$this->Cell(12,4,'',1,0,'L');
$this->Ln(6);
$this->cell(137);
$this->SetFont('Arial','',9);
$this->Cell(20,5,'Avance Fisico Real:',0,0,'L');
$this->Cell(10);
$this->Cell(12,4,'',1,0,'L');
//Contenido formato
$this->Ln(8);
$this->Image("images/avance.png",5,60,94,50,"PNG");
$this->Cell(89);
$this->SetFillColor(255,255,255);
$this->Cell(10,6,'Item',1,0,'C');
$this->Cell(68,6,'Descripcion',1,0,'C');
$this->Cell(13,6,'Unidad',1,0,'C');
$this->SetFont('Arial','',8);                                                                             
$this->MultiCell(15,3,'Cantidad Ejecutada',1,1,'C');
//ciclo de repeticion celdas
//Consulta para cuerpo tabla
//columna derecha
$sql "SELECT * FROM Actividades";
$cuerpo mysql_query($sql);
while (
$row mysql_fetch_row($cuerpo)){
$this->Cell(89);
$this->SetFont('Arial','',5);
$this->Cell(10,5,'',1,0,'C');
$this->Cell(68,5,'ejemplo celda',1,0,'C');
$this->Cell(13,5,'',1,0,'C');
$this->Cell(15,5,'',1,1,'C');
}
//ciclo de repeticion celdas
//Consulta para cuerpo tabla
//columna izquierda
$this->Ln(2);
$this->SetFont('Arial','',7);
$this->Cell(88,5,'ACTIVIDADES EJECUTADAS',1,0,'L');
$sql "SELECT * FROM items_2";
$cuerpo1 mysql_query($sql);
while (
$row mysql_fetch_row($cuerpo1)){
$this->Ln();
$this->Cell(88,5,'ejemplo de celdas',1,0,'L');
}
}
function 
Footer()
{
//Posición
$this->SetY(-30);
//Fuente
$this->SetFont('Arial','',8);
//Número de página
$this->SetFillColor(255,255,255);
$this->Cell(80,5,'Contratista',1,0,'C');
$this->Cell(80,5,'Coord. Especialidad PCL - Campo',1,0,'C');
$this->SetFont('Arial','',8);
$this->MultiCell(35,5,'Entregado antes de las 10:00am del siguiente dia',1,1,'J','T');
$this->Ln(0);
$this->SetFont('Arial','',8);
$this->Cell(160);
$this->Cell(17.5,10,'Si',1,0,'C');
$this->Cell(17.5,10,'No',1,0,'C');
$this->Ln(-5);
$this->Cell(20,5,'Nombre',1,0,'C');
$this->SetFont('Arial','',12);
$this->Cell(60,5,$entrega,1,0,'C');
$this->Cell(20,5,'Nombre',1,0,'C');
$this->SetFont('Arial','',12);
$this->Cell(60,5,$recibe,1,0,'C');
$this->SetFont('Arial','',10);
$this->Ln();
$this->Cell(20,5,'Fecha:',1,0,'C');
$this->Cell(60,5,'',1,0,'C');
$this->Cell(20,5,'Fecha:',1,0,'C');
$this->Cell(60,5,'',1,0,'C');
$this->Ln();
$this->Cell(20,5,'Firma',1,0,'C');
$this->Cell(60,5,'',1,0,'C');
$this->Cell(20,5,'Firma',1,0,'C');
$this->Cell(60,5,'',1,0,'C');
$this->Ln();
$this->SetFillColor(242,190,3);
$this->SetFont('Arial','',4);
$this->Cell(30,3,'FP-06',1,0,'C','T');
$this->Cell(40,3,'PROCESO:FACILIDADES',1,0,'C','T');
$this->Cell(20,3,'VERSION 3 (04/12/2013)',1,0,'C','T');
$this->Cell(105,3,'PAGINA 1 DE 1',1,0,'C','T');
}
}
//Impresion 
$pdf=new PDF();
$pdf->Output();
?>
Agradezco toda ayuda posible