From 9bbf45efed43ac4db08680d9ed1d5467cff7cb43 Mon Sep 17 00:00:00 2001 From: Guilliam Xavier Date: Thu, 26 Nov 2020 09:29:35 +0100 Subject: [PATCH] Fix pixelsToPoints conversion (for HTML col width) --- src/PhpSpreadsheet/Shared/Drawing.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PhpSpreadsheet/Shared/Drawing.php b/src/PhpSpreadsheet/Shared/Drawing.php index 25d6910d34..4ff89595db 100644 --- a/src/PhpSpreadsheet/Shared/Drawing.php +++ b/src/PhpSpreadsheet/Shared/Drawing.php @@ -98,7 +98,7 @@ public static function cellDimensionToPixels($pValue, \PhpOffice\PhpSpreadsheet\ */ public static function pixelsToPoints($pValue) { - return $pValue * 0.67777777; + return $pValue * 0.75; } /** @@ -111,7 +111,7 @@ public static function pixelsToPoints($pValue) public static function pointsToPixels($pValue) { if ($pValue != 0) { - return (int) ceil($pValue * 1.333333333); + return (int) ceil($pValue / 0.75); } return 0;