texto mas grande que Cell() Fpdf
Publicado por Rein (13 intervenciones) el 27/06/2008 17:04:50
Hola lo que pasa es que necesito imprimir unos datos en un pdf mediante Fpdf pero mi problema esta en que cuando el campo de texto es muy grande se sale de los parametros de la celda (Cell()) que le doy para la impresion del texto y cuando utilizo una MultiCell() funciona pero me produce otro problema, el cual es que al imprimir la informacion que viene escribe encima de donde termino la MultiCell.
Este es el codigo
while ($this->busca= mysql_fetch_row($this->result)){
$this->cantidad2=$this->busca[4];
$this->total=$this->busca[5]*$this->cantidad2;
$this->suma=$this->suma+$this->total;
//cantidad
$this->setXY(21,$fila);
$this->cantidad3=$this->busca[5];
$this->cantidad3=number_format($this->cantidad3,0,'','.');
if($this->cantidad3!=0){
$this->Cell(17,4,$this->cantidad3,0,1,'R');
}
//AQUI SE ENCUENTRA MI PROBLEMA EN LA DESCRIPCION DEL PRODUCTO
//descripcion
$this->setXY(39,$fila);
//ESTA ES LA MULTICELDA DEL PROBLEMA.
$this->MultiCell(107,4,$this->busca[3],0,'nodesign');
//precio
$this->setXY(145,$fila);
$this->precio2=$this->busca[4];
$this->precio2=number_format($this->precio2,0,'','.');
if($this->precio2!=0){
$this->Cell(23,4,$this->precio2,0,1,'R');
}
//total
$this->setXY(168,$fila);
$this->total2=$this->busca[5]*$this->cantidad2;
$this->total2=number_format($this->total2,0,'','.');
if($this->total2!=0){
$this->Cell(22,4,$this->total2,0,1,'R');
}
//fin WHILE
$fila+=4;
}
Les agradeceria mucho su ayuda.
Este es el codigo
while ($this->busca= mysql_fetch_row($this->result)){
$this->cantidad2=$this->busca[4];
$this->total=$this->busca[5]*$this->cantidad2;
$this->suma=$this->suma+$this->total;
//cantidad
$this->setXY(21,$fila);
$this->cantidad3=$this->busca[5];
$this->cantidad3=number_format($this->cantidad3,0,'','.');
if($this->cantidad3!=0){
$this->Cell(17,4,$this->cantidad3,0,1,'R');
}
//AQUI SE ENCUENTRA MI PROBLEMA EN LA DESCRIPCION DEL PRODUCTO
//descripcion
$this->setXY(39,$fila);
//ESTA ES LA MULTICELDA DEL PROBLEMA.
$this->MultiCell(107,4,$this->busca[3],0,'nodesign');
//precio
$this->setXY(145,$fila);
$this->precio2=$this->busca[4];
$this->precio2=number_format($this->precio2,0,'','.');
if($this->precio2!=0){
$this->Cell(23,4,$this->precio2,0,1,'R');
}
//total
$this->setXY(168,$fila);
$this->total2=$this->busca[5]*$this->cantidad2;
$this->total2=number_format($this->total2,0,'','.');
if($this->total2!=0){
$this->Cell(22,4,$this->total2,0,1,'R');
}
//fin WHILE
$fila+=4;
}
Les agradeceria mucho su ayuda.
Valora esta pregunta


0