| Category | Text measurement |
|---|---|
| Note | same format-tag caveat as pdfGetFTextHeight |
Purpose — Same as pdfGetFTextHeight, but takes Width explicitly instead of reading the current text rectangle.
Declarations
C
double __stdcall pdfGetFTextHeightExA(PPDF IPDF, double Width, int32_t Align, const char* AText);
double __stdcall pdfGetFTextHeightExW(PPDF IPDF, double Width, int32_t Align, const wchar_t* AText);
Delphi
function pdfGetFTextHeightExA(const IPDF: PPDF; Width: Double; Align: Integer; const AText: PAnsiChar): Double; stdcall; external 'LumasPdf.dll';
function pdfGetFTextHeightExW(const IPDF: PPDF; Width: Double; Align: Integer; const AText: PWideChar): Double; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Width | Double | Rectangle width to simulate wrapping against. |
Align | Integer | Accepted but not read — see pdfGetFTextHeight. |
AText | string | Text to measure. Same tag-parsing caveat as pdfGetFTextHeight. |
Return value — Predicted height in points; 0.0 if Width <= 0, no font is selected, or AText is empty.
See also — pdfGetFTextHeight, pdfWriteFTextEx
C# (P/Invoke)
wrappers/dotnet/LumasPdf.cs
public static extern double pdfGetFTextHeightExA(IntPtr IPDF, double Width, int Align, [MarshalAs(UnmanagedType.LPStr)] string AText);
public static extern double pdfGetFTextHeightExW(IntPtr IPDF, double Width, int Align, [MarshalAs(UnmanagedType.LPWStr)] string AText);
Area
Text
Category
Getters
Exported names
pdfGetFTextHeightExA
pdfGetFTextHeightExW
String variants
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
See working code
Worked examples — complete programs in ten languages.