File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/PhpWord/Writer/RTF/Style Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,17 @@ public function write()
55
55
$ content .= $ this ->getValueIf ($ style ->getFooterHeight () !== null , '\footery ' . round ($ style ->getFooterHeight ()));
56
56
$ content .= $ this ->getValueIf ($ style ->getGutter () !== null , '\guttersxn ' . round ($ style ->getGutter ()));
57
57
$ content .= $ this ->getValueIf ($ style ->getPageNumberingStart () !== null , '\pgnstarts ' . $ style ->getPageNumberingStart () . '\pgnrestart ' );
58
+
59
+ // Vertical Align
60
+ $ verticalAlign = [
61
+ \PhpOffice \PhpWord \SimpleType \VerticalJc::TOP => '\vertalt ' ,
62
+ \PhpOffice \PhpWord \SimpleType \VerticalJc::CENTER => '\vertalc ' ,
63
+ \PhpOffice \PhpWord \SimpleType \VerticalJc::BOTH => '\vertalj ' ,
64
+ \PhpOffice \PhpWord \SimpleType \VerticalJc::BOTTOM => '\vertalb ' ,
65
+ ];
66
+ if (isset ($ verticalAlign [$ style ->getVAlign ()])) {
67
+ $ content .= $ verticalAlign [$ style ->getVAlign ()];
68
+ }
58
69
$ content .= ' ' ;
59
70
60
71
// Borders
You can’t perform that action at this time.
0 commit comments