- $ancho_pagina = $this->_marco->getWidth($this->_marco->orientacion);
- for ($i=0; $i<$this->_tabla->getColCount(); $i++ ) {
- $tmp = $this->_tabla->getCellAttributes(0,$i);
- if (is_null(@$tmp['width'])) {
- die ('Todas las columnas deben tener asignado un ancho.');
+ $ancho_pagina = $this->_marco->getWidth($this->_marco->refPage(),
+ $this->_marco->getOrientation());
+ 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)
+ $attr[$i] = intval($tmp['width']);
+ if(count($attr) == $this->_tabla->getColCount())
+ break;