Beispiel #1
0
 /**
  * tag : P
  * mode : OPEN
  *
  * @param    array $param
  * @return boolean
  */
 protected function _tag_open_P($param)
 {
     if ($this->_isForOneLine) {
         return false;
     }
     if (!in_array($this->_previousCall, array('_tag_close_P', '_tag_close_UL'))) {
         if ($this->_maxH) {
             $this->_tag_open_BR(array());
         }
     }
     $this->parsingCss->save();
     $this->parsingCss->analyse('p', $param);
     $this->parsingCss->setPosition();
     $this->parsingCss->fontSet();
     // cancel the effects of the setPosition
     $this->pdf->setXY($this->pdf->getX() - $this->parsingCss->value['margin']['l'], $this->pdf->getY() - $this->parsingCss->value['margin']['t']);
     list($mL, $mR) = $this->_getMargins($this->pdf->getY());
     $mR = $this->pdf->getW() - $mR;
     $mL += $this->parsingCss->value['margin']['l'] + $this->parsingCss->value['padding']['l'];
     $mR += $this->parsingCss->value['margin']['r'] + $this->parsingCss->value['padding']['r'];
     $this->_saveMargin($mL, 0, $mR);
     if ($this->parsingCss->value['text-indent'] > 0) {
         $y = $this->pdf->getY() + $this->parsingCss->value['margin']['t'] + $this->parsingCss->value['padding']['t'];
         $this->_pageMarges[floor($y * 100)] = array($mL + $this->parsingCss->value['text-indent'], $this->pdf->getW() - $mR);
         $y += $this->parsingCss->getLineHeight() * 0.1;
         $this->_pageMarges[floor($y * 100)] = array($mL, $this->pdf->getW() - $mR);
     }
     $this->_makeBreakLine($this->parsingCss->value['margin']['t'] + $this->parsingCss->value['padding']['t']);
     $this->_isInParagraph = array($mL, $mR);
     return true;
 }