/** * create a sub HTML2PDF, to calculate the multi-tables * * @access protected * @param &HTML2PDF $subHtml sub HTML2PDF to create * @param integer $cellmargin if in a TD : cellmargin of this td */ protected function _createSubHTML(&$subHtml, $cellmargin=0) { // prepare the subObject, if never prepare before if (HTML2PDF::$_subobj===null) { $this->_prepareSubObj(); } // calculate the width to use if ($this->parsingCss->value['width']) { $marge = $cellmargin*2; $marge+= $this->parsingCss->value['padding']['l'] + $this->parsingCss->value['padding']['r']; $marge+= $this->parsingCss->value['border']['l']['width'] + $this->parsingCss->value['border']['r']['width']; $marge = $this->pdf->getW() - $this->parsingCss->value['width'] + $marge; } else { $marge = $this->_margeLeft+$this->_margeRight; } // BUGFIX : we have to call the method, because of a bug in php 5.1.6 HTML2PDF::$_subobj->pdf->getPage(); // clone the sub oject $subHtml = clone HTML2PDF::$_subobj; $subHtml->parsingCss->table = $this->parsingCss->table; $subHtml->parsingCss->value = $this->parsingCss->value; $subHtml->initSubHtml( $this->_format, $this->_orientation, $marge, $this->_page, $this->_defList, $this->pdf->getMyLastPageGroup(), $this->pdf->getMyLastPageGroupNb() ); }