Skip to content

Commit 1666f5b

Browse files
committed
Fix converting mm to emus
1 parent 63b53ff commit 1666f5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Html2OpenXml/Primitives/Unit.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private static long ComputeInEmus(UnitMetric type, double value)
111111
case UnitMetric.Emus: return (long) value;
112112
case UnitMetric.Inch: return (long) (value * 914400L);
113113
case UnitMetric.Centimeter: return (long) (value * 360000L);
114-
case UnitMetric.Millimeter: return (long) (value * 3600000L);
114+
case UnitMetric.Millimeter: return (long) (value * 36000L);
115115
case UnitMetric.EM:
116116
// well this is a rough conversion but considering 1em = 12pt (http://sureshjain.wordpress.com/2007/07/06/53/)
117117
return (long) (value / 72 * 914400L * 12);

0 commit comments

Comments
 (0)