MS WORD page calculation from C#

K

Kristijan Marin

Hi,

I can't get to figure out the calculation that is done on pageSetup object
in Word.Document object ....
Everything is in points .... and i'm only interested in height and lines
,,,,

I found out that A4 page is 842 in Height and 594 in width ...... line
spacing is 12 ...
when setting every margin,grid,distance to 0, LinesPage parameter gets 46 i
thought this is the number of lines but guess not

Now if i go and count the lines myself i get 61 lines ......

So now why Word returns 46 and does this 12 for linespacing actually defines
height of the line or not ?

If this is not it how do i get the exact height of a line ?

I know this got something to do with Font itself cause Times 12 has
different height then Arial 12 etc .... but where to look for data to get
correct calculation ?

Thanks.
Kris
 
K

Kristijan Marin

Well what i did now is I took Word.Font data and use it in
SystemDrawing.Font object to got date from it.

and it works.

Kris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top