private function resetPageBreakTrigger() { // pagebreak trigger adaptation if ($this->table) { $this->pageBreakTrigger = $this->table->getPdF()->getPageHeight() - $this->table->getPdf()->getBreakMargin() - $this->footerHeight; } }
/** * Get the remaining width available, taking into account margins and * other cells width or the specified maxwidth if any. * * @param TcTable $table * @param array|float $width sum of all other cells width * @return float */ private function getRemainingColumnWidth(TcTable $table, $width) { if (!$this->maxWidth) { $margins = $table->getPdf()->getMargins(); $content_width = $table->getPdf()->getPageWidth() - $margins['left'] - $margins['right']; } else { $content_width = $this->maxWidth; } $result = $content_width - (is_array($width) ? array_sum($width) : $width); return $result > 0 ? $result : 0; }
/** * Adjust Y because cell background passes over the previous cell's border, * hiding it. * * @param TcTable $table */ public function moveY(TcTable $table) { $y = 0.6 / $table->getPdf()->getScaleFactor(); $table->getPdf()->SetY($table->getPdf()->GetY() + $y); }