/** * 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); }
/** * Set the New position for the current Tag * * @return void */ public function setPosition() { // get the current position $currentX = $this->pdf->getX(); $currentY = $this->pdf->getY(); // save it $this->value['xc'] = $currentX; $this->value['yc'] = $currentY; if ($this->value['position'] == 'relative' || $this->value['position'] == 'absolute') { if ($this->value['right'] !== null) { $x = $this->getLastWidth(true) - $this->value['right'] - $this->value['width']; if ($this->value['margin']['r']) { $x -= $this->value['margin']['r']; } } else { $x = $this->value['left']; if ($this->value['margin']['l']) { $x += $this->value['margin']['l']; } } if ($this->value['bottom'] !== null) { $y = $this->getLastHeight(true) - $this->value['bottom'] - $this->value['height']; if ($this->value['margin']['b']) { $y -= $this->value['margin']['b']; } } else { $y = $this->value['top']; if ($this->value['margin']['t']) { $y += $this->value['margin']['t']; } } if ($this->value['position'] == 'relative') { $this->value['x'] = $currentX + $x; $this->value['y'] = $currentY + $y; } else { $this->value['x'] = $this->getLastAbsoluteX() + $x; $this->value['y'] = $this->getLastAbsoluteY() + $y; } } else { $this->value['x'] = $currentX; $this->value['y'] = $currentY; if ($this->value['margin']['l']) { $this->value['x'] += $this->value['margin']['l']; } if ($this->value['margin']['t']) { $this->value['y'] += $this->value['margin']['t']; } } // save the new position $this->pdf->setXY($this->value['x'], $this->value['y']); }