Esempio n. 1
0
 /**
  * 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 (self::$_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
     self::$_subobj->pdf->getPage();
     // clone the sub oject
     $subHtml = clone self::$_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());
 }