getStyle(); if (!$style instanceof SectionStyle) { return ''; } $content = ''; $content .= '\sectd '; // Size & margin $content .= $this->getValueIf($style->getPageSizeW(), '\pgwsxn' . $style->getPageSizeW()); $content .= $this->getValueIf($style->getPageSizeH(), '\pghsxn' . $style->getPageSizeH()); $content .= ' '; $content .= $this->getValueIf($style->getMarginTop(), '\margtsxn' . $style->getMarginTop()); $content .= $this->getValueIf($style->getMarginRight(), '\margrsxn' . $style->getMarginRight()); $content .= $this->getValueIf($style->getMarginBottom(), '\margbsxn' . $style->getMarginBottom()); $content .= $this->getValueIf($style->getMarginLeft(), '\marglsxn' . $style->getMarginLeft()); $content .= $this->getValueIf($style->getHeaderHeight(), '\headery' . $style->getHeaderHeight()); $content .= $this->getValueIf($style->getFooterHeight(), '\footery' . $style->getFooterHeight()); $content .= $this->getValueIf($style->getGutter(), '\guttersxn' . $style->getGutter()); $content .= ' '; // Borders if ($style->hasBorder()) { $styleWriter = new Border($style); $styleWriter->setParentWriter($this->getParentWriter()); $styleWriter->setSizes($style->getBorderSize()); $styleWriter->setColors($style->getBorderColor()); $content .= $styleWriter->write(); } return $content . PHP_EOL; } }