X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/1987da66623bb8751c59e8133b7654a871000857..257f6d7dbd82d87a8c311211559bc637785f7b5c:/lib/MECON/PDF/Tabla.php?ds=sidebyside diff --git a/lib/MECON/PDF/Tabla.php b/lib/MECON/PDF/Tabla.php index db1f332..da8cb01 100644 --- a/lib/MECON/PDF/Tabla.php +++ b/lib/MECON/PDF/Tabla.php @@ -177,14 +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(intval($tmp['width']) != 0) + if(@intval($tmp['width']) != 0) $attr[$i] = intval($tmp['width']); - if(count($attr) == $this->_tabla->getColCount()) - break; + if(@count($attr) == $this->_tabla->getColCount()) + break 2; } - if(count($attr) == $this->_tabla->getColCount()) - break; } + + if (!isset($attr)) + die ('Todas las columnas tienen que tener un ancho asignado'); + $tmp = array_sum($attr); $attr2[0] = 0; @@ -339,7 +341,7 @@ class MECON_PDF_Tabla extends MECON_PDF_Contenido { } } if (@$estilo['colspan']) { - $j += $estilo['colspan']; + $j += $estilo['colspan']-1; } }