Tema: Pdf php
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/01/2005, 08:43
Phantasma__
 
Fecha de Ingreso: noviembre-2003
Mensajes: 39
Antigüedad: 20 años, 5 meses
Puntos: 0
Pregunta Pdf php

Tengo la funcion head que me muestra la cabecera de la pagina la cual se muestra en todas las paginas en caso de que al consulta entrege varios valores
El problema es que en la funcion atos cargo el numero de documento en caso de haber dos paginas no me lo muestra en la segunda como puedo hacer aparacer ese numero en todas las paginas??? probe poniendolo dentro de la funcion head y no me funciona.
ademas la funcion ancitable tiene un encabezado qeu tampoco lo muestra en todas las paginas
como hago para que este aparezca en todas las paginas???



class PDF extends FPDF
{
function Header()
{
$this->Image('../../logo_coelcha.jpg',13,8,34,14);
$this->SetFont('Arial','B',15);
$this->Ln(5);
$this->Cell(30);
$this->Cell(105,20,'INGRESO A BODEGA POR DEVOLUCION',0,0,'');
$this->SetFont('Arial','B',15);
$this->Ln();
}
function datos($ident)
{
$this->Ln(-12);
$this->SetFont('Arial','',12);
$this->write(5,'Señor(es): '.$ident.'','');
$this->Ln();
}

function LoadData($resultados)
{
$data=array();
while ($lines=mysql_fetch_array($resultados))
{
$data[]=$lines['codigo_interno'];
$data[]=$lines['cantidad'];
$data[]=substr($lines['descripcion'],0,50);
$data[]=$lines['unidad_medida'];
$data[]=substr($lines['familia'],0,10);
$data[]=number_format($lines['costo_promedio'] ,0 , "," ,".");
}
return $data;
}
function FancyTable($header,$data)
{
$this->Ln();
$this->SetFillColor(255,255,255);
$this->SetLineWidth(.3);
$this->SetFont('','B','8');
$w=array(20,20,70,25,25,30);
for($i=0;$i<count($header);$i++)
$this->Cell($w[$i],6,$header[$i],1,0,'C',1);
$this->Ln();
$this->SetFillColor(224,235,255);
$this->SetTextColor(0);
$this->SetFont('');
$fill=0;
$i=0;
$j=0;
foreach($data as $row)
{
$this->Cell($w[$i],6,$row,'LR',0,'L',$fill);
$i=$i+1;
if($i=='6')
{
$i=0;
$this->Ln();
}
}
while($cant_result<12)
{
$this->Cell(20,6,0,'LR',0,'L',0);
$this->Cell(20,6,0,'LR',0,'L',0);
$this->Cell(70,6,0,'LR',0,'L',0);
$this->Cell(25,6,0,'LR',0,'L',0);
$this->Cell(25,6,0,'LR',0,'L',0);
$this->Cell(30,6,0,'LR',0,'L',0);
$cant_result+=1;
$this->Ln();
}

$this->Cell(190,0,'','1',1,'L',0);
$this->Ln();
}
$cabezal=array('CODIGO','CANTIDAD','DESCRIPCION',' UNIDAD MEDIDA','FAMILIA','COSTO PROMEDIO');
$pdf->fancytable($cabezal,$datos);
__________________
Fantasma