GetFormulaWidth

Text, Formula layout, Measurement

Description

Returns the width of a parsed mathematical formula using the current font and text size

Syntax

Delphi

Function TPDFlib.GetFormulaWidth(Const Formula: WideString): Double;

ActiveX

Function PDFlib::GetFormulaWidth(Formula As String) As Double

DLL

double DLGetFormulaWidth(int InstanceID, const wchar_t * Formula);

Parameters

FormulaFormula source to measure

Return values

Returns the formula width in the active measurement units, or 0 for empty input

Remarks

The result includes fraction padding, script offsets, radical signs, optional root indices, and nested groups

The DLL DLGetFormulaWidthA variant accepts text according to the configured ANSI mode