X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/1987da66623bb8751c59e8133b7654a871000857..da1be2b62d934466602b78f914506267dc27da8c:/lib/MECON/PDF/Tabla.php?ds=sidebyside diff --git a/lib/MECON/PDF/Tabla.php b/lib/MECON/PDF/Tabla.php index db1f332..719962f 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; @@ -295,7 +297,7 @@ class MECON_PDF_Tabla extends MECON_PDF_Contenido { } if (@$estilo['colspan']) { - $jj += $estilo['colspan']; + $jj += $estilo['colspan'] -1; } } @@ -339,7 +341,7 @@ class MECON_PDF_Tabla extends MECON_PDF_Contenido { } } if (@$estilo['colspan']) { - $j += $estilo['colspan']; + $j += $estilo['colspan']-1; } }