Skip to content

Commit 28505b0

Browse files
author
Ralph02
committed
RTF writer: Round getPageSizeW and getPageSizeH to avoid decimals
1 parent 2bfd82e commit 28505b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PhpWord/Writer/RTF/Style/Section.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public function write()
4343
$content .= '\sectd ';
4444

4545
// Size & margin
46-
$content .= $this->getValueIf($style->getPageSizeW() !== null, '\pgwsxn' . $style->getPageSizeW());
47-
$content .= $this->getValueIf($style->getPageSizeH() !== null, '\pghsxn' . $style->getPageSizeH());
46+
$content .= $this->getValueIf($style->getPageSizeW() !== null, '\pgwsxn' . round($style->getPageSizeW()));
47+
$content .= $this->getValueIf($style->getPageSizeH() !== null, '\pghsxn' . round($style->getPageSizeH()));
4848
$content .= ' ';
4949
$content .= $this->getValueIf($style->getMarginTop() !== null, '\margtsxn' . $style->getMarginTop());
5050
$content .= $this->getValueIf($style->getMarginRight() !== null, '\margrsxn' . $style->getMarginRight());

0 commit comments

Comments
 (0)