PdfGetTextWidth Method

See Also     Examples     Applies To

Calculate the width of the specified text, based on the selected font and font size. The result is measured in current unit defined by the PdfSetMeasurementUnits() function.

Syntax

object.PdfGetTextWidth (sText, nFontId, nFontSize)

The PdfGetTextWidth syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
sText Required. String. The text to determine the width for.
nFontId Required. Long. The Font ID. Value returned by the PdfAddFont() function.
nFontSize Required. Long. The font size in point. 1 point = 1/72 inch.

Returns

Single. The width of the text in current unit defined by the PdfSetMeasurementUnits() function.

Remarks

This function can only be used with the native PDF created by the PdfNewPdfEx() function.

Category

PDF Functions





© Copyright 2008 GdPicture All rights reserved.
Documentation MAP.