GetTextLength

Return the width of the text for a given font and size.

Not intended to be used directly from your code.

GetTextLength(Text As String, FontDictionaryName As String, FontSize As Single) As Single

Values passed to this procedure:

TextThe text to draw.
FontDictionaryNameThe name used to reference the font within the document Font Dictionary. The FontDictionaryName is assigned to the font when you call LoadFont.
FontSizeThe em-size of the font.

Example

LoadFont("Arial", pdf.FontName.Arial, pdf.FontStyle.Regular)

Dim TextLength As Single = GetTextLength("This is a test", "Arial", 24)