Merge pull request #665 from Canta/patch-1

Fix for #633
This commit is contained in:
Mark Baker 2015-09-14 23:01:01 +01:00
commit f6a2107856

View File

@ -1576,17 +1576,17 @@ class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_
$htmlBody = 'body { '; $htmlBody = 'body { ';
$left = PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getLeft()) . 'in; '; $left = PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getLeft()) . 'in; ';
$htmlPage .= 'left-margin: ' . $left; $htmlPage .= 'margin-left: ' . $left;
$htmlBody .= 'left-margin: ' . $left; $htmlBody .= 'margin-left: ' . $left;
$right = PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getRight()) . 'in; '; $right = PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getRight()) . 'in; ';
$htmlPage .= 'right-margin: ' . $right; $htmlPage .= 'margin-right: ' . $right;
$htmlBody .= 'right-margin: ' . $right; $htmlBody .= 'margin-right: ' . $right;
$top = PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getTop()) . 'in; '; $top = PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getTop()) . 'in; ';
$htmlPage .= 'top-margin: ' . $top; $htmlPage .= 'margin-top: ' . $top;
$htmlBody .= 'top-margin: ' . $top; $htmlBody .= 'margin-top: ' . $top;
$bottom = PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getBottom()) . 'in; '; $bottom = PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getBottom()) . 'in; ';
$htmlPage .= 'bottom-margin: ' . $bottom; $htmlPage .= 'margin-bottom: ' . $bottom;
$htmlBody .= 'bottom-margin: ' . $bottom; $htmlBody .= 'margin-bottom: ' . $bottom;
$htmlPage .= "}\n"; $htmlPage .= "}\n";
$htmlBody .= "}\n"; $htmlBody .= "}\n";