Merge pull request #1493 from Patrick64/develop

RTF writer: Round getPageSizeW and getPageSizeH to avoid decimals
This commit is contained in:
troosan 2018-11-20 21:06:29 +01:00 committed by GitHub
commit 586f45efea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@ v0.16.0 (xx xxx 2018)
### Fixed
- Fix regex in `cloneBlock` function @nicoder #1269
- HTML Title Writer loses text when Title contains a TextRun instead a string. @begnini #1436
- RTF writer: Round getPageSizeW and getPageSizeH to avoid decimals @Patrick64 #1493
v0.15.0 (14 Jul 2018)
----------------------

View File

@ -43,8 +43,8 @@ class Section extends AbstractStyle
$content .= '\sectd ';
// Size & margin
$content .= $this->getValueIf($style->getPageSizeW() !== null, '\pgwsxn' . $style->getPageSizeW());
$content .= $this->getValueIf($style->getPageSizeH() !== null, '\pghsxn' . $style->getPageSizeH());
$content .= $this->getValueIf($style->getPageSizeW() !== null, '\pgwsxn' . round($style->getPageSizeW()));
$content .= $this->getValueIf($style->getPageSizeH() !== null, '\pghsxn' . round($style->getPageSizeH()));
$content .= ' ';
$content .= $this->getValueIf($style->getMarginTop() !== null, '\margtsxn' . $style->getMarginTop());
$content .= $this->getValueIf($style->getMarginRight() !== null, '\margrsxn' . $style->getMarginRight());