can"t get length of symbol string in points
am 11.10.2007 09:34:01 von HiperiX
Hello,
I am workin' on creating web from as pdf file.
My pdf file size is 595 x 820 points. Can anybody tell how can I count the
length of my string in points?
string x;
int y;
y = x.Length; // gives me length in symbols, but I need string length in
points. Can anybody help with this?
Thank you ;)
Re: can"t get length of symbol string in points
am 11.10.2007 11:37:01 von nemtsev
Hello HiperiX,
to get the length in pixel u need to know the font which will be used in
rendering your text.
I general the the Graphics.MeasureString method do it
---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
H> Hello,
H>
H> I am workin' on creating web from as pdf file.
H>
H> My pdf file size is 595 x 820 points. Can anybody tell how can I
H> count the length of my string in points?
H>
H> string x;
H> int y;
H> y = x.Length; // gives me length in symbols, but I need string length
H> in
H> points. Can anybody help with this?
H> Thank you ;)
H>