예제 #1
0
 /**
  * tag : END_LAST_PAGE
  * mode : OPEN
  *
  * @param  array $param
  * @return void
  */
 protected function _tag_open_END_LAST_PAGE($param)
 {
     $height = $this->parsingCss->ConvertToMM($param['end_height'], $this->pdf->getH() - $this->pdf->gettMargin() - $this->pdf->getbMargin());
     if ($height < $this->pdf->getH() - $this->pdf->gettMargin() - $this->pdf->getbMargin() && $this->pdf->getY() + $height >= $this->pdf->getH() - $this->pdf->getbMargin()) {
         $this->_setNewPage();
     }
     $this->parsingCss->save();
     $this->parsingCss->analyse('end_last_page', $param);
     $this->parsingCss->setPosition();
     $this->parsingCss->fontSet();
     $this->pdf->setY($this->pdf->getH() - $this->pdf->getbMargin() - $height);
 }
예제 #2
0
파일: Css.php 프로젝트: juchi/html2pdf
 /**
  * Get the height of the parent
  *
  * @param  boolean $mode true => adding padding and border
  *
  * @return float height in mm
  */
 public function getLastHeight($mode = false)
 {
     for ($k = count($this->table) - 1; $k >= 0; $k--) {
         if ($this->table[$k]['height']) {
             $h = $this->table[$k]['height'];
             if ($mode) {
                 $h += $this->table[$k]['border']['t']['width'] + $this->table[$k]['padding']['t'] + 0.02;
                 $h += $this->table[$k]['border']['b']['width'] + $this->table[$k]['padding']['b'] + 0.02;
             }
             return $h;
         }
     }
     return $this->pdf->getH() - $this->pdf->gettMargin() - $this->pdf->getbMargin();
 }