Hi,
Yes there is. Its a method in the XGraphics class called MeasureString....
to get an XGraphics object you do XGraphics.FromPdfPage(yourPageHere), where your page here could be something like myPdfDocument.Pages[0] etc.
The XGraphics MeasureString() method basically works like the normal MeasureString, but yuu pass in the relevant font ( i presume its a XFont, but havnt checked - intellisense will tell you though... ) and the string you wish to measure, the function will then return a XRectangle or something like that, which you can get the width from.
Hope this helps
Mike
|