X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/e8763947c5e4e45c3804097424f8c670b4160001..24694147d31511d51f2ccda4584c44a493297101:/lib/MECON/PDF/Tabla.php diff --git a/lib/MECON/PDF/Tabla.php b/lib/MECON/PDF/Tabla.php index 94a278d..3530180 100644 --- a/lib/MECON/PDF/Tabla.php +++ b/lib/MECON/PDF/Tabla.php @@ -177,15 +177,16 @@ class MECON_PDF_Tabla extends MECON_PDF_Contenido { for ($row = 0; $row<$this->_tabla->getRowCount(); $row++) { for ($i=0; $i<$this->_tabla->getColCount(); $i++ ) { $tmp = $this->_tabla->getCellAttributes($row,$i); - if (is_null(@$tmp['width'])) { - $attr[$i] = 0; - } - else { + if(intval($tmp['width']) != 0) $attr[$i] = intval($tmp['width']); - } + if(count($attr) == $this->_tabla->getColCount()) + break; } + if(count($attr) == $this->_tabla->getColCount()) + break; } $tmp = array_sum($attr); + $attr2[0] = 0; for ($i=1; $i_marco->getOrientation(); $alto = $this->_marco->espacioDisponible; } - $attr2 = $this->_obtenerAnchoColumnas(); - for ($i = 0; $i < $this->_tabla->getRowCount(); $i++) { $max = 0; for ($j = 0; $j < $this->_tabla->getColCount(); $j++) { @@ -241,7 +240,6 @@ class MECON_PDF_Tabla extends MECON_PDF_Contenido { else { $ancho_columna = $attr2[$j+1] - $attr2[$j]; } - $txt = $this->_marco->wordWrap( @$this->_tabla->getCellContents($i,$j), $ancho_columna, $estilo); @@ -256,7 +254,6 @@ class MECON_PDF_Tabla extends MECON_PDF_Contenido { $repetir[$i]['max'] = $max; } } - if ($alto <= 0) { $this->_newPage();