Using document.Application.PixelsToPoints will give different results

17 views Asked by At

When I use document.Application.PixelsToPoints(14), the parameters are the same, the environment is the same, and the same computer is used, but the results are different.

The result obtained by a.word is: 7 var aword = document.Application.PixelsToPoints(14); // aword = 7 The result obtained by b.word is: 10.5 var bword = document.Application.PixelsToPoints(14); // bword = 10.5

How do I manipulate these two words to get the same result?

1

There are 1 answers

0
hano7758 On

I found the reason why the extracted values are different. If the <w:pixelsPerInch w:val="144"/> attribute is set in the WebSettings.xml file of Word, the result obtained will be different from the default result without this attribute