Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/08/2009, 11:18
Avatar de dalyla
dalyla
 
Fecha de Ingreso: septiembre-2005
Mensajes: 135
Antigüedad: 18 años, 7 meses
Puntos: 1
Solucion

En el fpdf creas dos funciones en tu codigo llamadas header y footer, las mandas llamar en cada reporte.

Código PHP:
function Header()
      {
      global 
$titulo;

      
$this->Image('imagenes\logo.jpg',20,8,15);

      
$this->SetFont('Arial','B',12);
      
//Cell(width, height, string,border[0:noborder,1:frame; L:left, T:top, R:right, B:bottom], ln[0:to the right, 1:to the begining of the next line, 2:below], align [L:left, C:center, R:right], fill[true, false], URL or identifier returned by AddLink())
      
$this->Cell(30,6,Titulo.',0,1,'C);


      
//Line break
      
$this->Ln(20); 
y el footer

Código PHP:
function Footer()
      {
      
//Position at 1.5 cm from bottom
      
$this->SetY(-15);
      
//Arial italic 8
      
$this->SetFont('Arial','I',8);
      
//Page number
      
$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
      } 

Para centrar todo pues haces la celda de un tamaño grande para que centres el texto. Dentro del codigo puse que significa cada paramentro espero te sirva.

Con respecto al otro pues no lo he utilizado