Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   7.6    Statistic  


Computes the width of a text string.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 5.0 Yes Yes Yes Yes Yes

MBS( "DynaPDF.GetTextWidth"; PDF; Text )


Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
Text The text to measure. "Hello World"


Returns width or error.


Computes the width of a text string.
The graphics state parameters character spacing, word spacing, text scaling, and the current font size are all considered. A font must be set before this function can be used.
The function computes the visible width of the string. This is the width excluding the last character spacing. The bounding box of the string is the text width plus the current character spacing. This behavior must be taken into account when writing right aligned text with DynaPDF.WriteFText. Due to certain formatting rules DynaPDF.WriteFText uses the bounding box of a text string to output text.

See also GetTextWidth function in DynaPDF manual.

See also

DynaPDF.GetTextScaling   -   DynaPDF.GetTransparentColor

Feedback: Report problem or ask question.

MBS FileMaker Plugins