Esempio n. 1
0
 /**
  * tag : DIV
  * mode : CLOSE
  *
  * @param  array $param
  * @param  string $other name of tag that used the div tag
  * @return boolean
  */
 protected function _tag_close_DIV($param, $other = 'div')
 {
     if ($this->_isForOneLine) {
         return false;
     }
     if ($this->parsingCss->value['overflow'] == 'hidden') {
         $this->_maxX = $this->parsingCss->value['old_maxX'];
         $this->_maxY = $this->parsingCss->value['old_maxY'];
         $this->_maxH = $this->parsingCss->value['old_maxH'];
         $this->_isInOverflow = $this->parsingCss->value['old_overflow'];
         $this->pdf->clippingPathStop();
     }
     if ($this->parsingCss->value['rotate']) {
         $this->pdf->stopTransform();
     }
     $marge = array();
     $marge['l'] = $this->parsingCss->value['border']['l']['width'] + $this->parsingCss->value['padding']['l'] + 0.03;
     $marge['r'] = $this->parsingCss->value['border']['r']['width'] + $this->parsingCss->value['padding']['r'] + 0.03;
     $marge['t'] = $this->parsingCss->value['border']['t']['width'] + $this->parsingCss->value['padding']['t'] + 0.03;
     $marge['b'] = $this->parsingCss->value['border']['b']['width'] + $this->parsingCss->value['padding']['b'] + 0.03;
     $x = $this->parsingCss->value['x'];
     $y = $this->parsingCss->value['y'];
     $w = $this->parsingCss->value['width'] + $marge['l'] + $marge['r'] + $this->parsingCss->value['margin']['r'];
     $h = $this->parsingCss->value['height'] + $marge['t'] + $marge['b'] + $this->parsingCss->value['margin']['b'];
     switch ($this->parsingCss->value['rotate']) {
         case 90:
             $t = $w;
             $w = $h;
             $h = $t;
             break;
         case 270:
             $t = $w;
             $w = $h;
             $h = $t;
             break;
         default:
             break;
     }
     if ($this->parsingCss->value['position'] != 'absolute') {
         $this->pdf->setXY($x + $w, $y);
         $this->_maxX = max($this->_maxX, $x + $w);
         $this->_maxY = max($this->_maxY, $y + $h);
         $this->_maxH = max($this->_maxH, $h);
     } else {
         $this->pdf->setXY($this->parsingCss->value['xc'], $this->parsingCss->value['yc']);
         $this->_loadMax();
     }
     $block = $this->parsingCss->value['display'] != 'inline' && $this->parsingCss->value['position'] != 'absolute';
     $this->parsingCss->load();
     $this->parsingCss->fontSet();
     $this->_loadMargin();
     if ($block) {
         $this->_tag_open_BR(array());
     }
     if ($this->_debugActif) {
         $this->_DEBUG_add(strtoupper($other), false);
     }
     return true;
 }