can't get length of symbol string in points

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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 ;)
 
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>
 
Back
Top