| Category | Text decoding |
|---|
Purpose — Copy the already-decoded Unicode text carried by a TPDFStack (as filled by pdfGetPageText) into a caller-supplied wide buffer.
Description — A pure buffer-copy helper — no font or document involved; it just NUL-safely copies Stack.Text up to Size-1 characters.
Declarations
C
int32_t __stdcall fntTranslateString(TPDFStack* Stack, const wchar_t* Buffer, uint32_t Size, uint32_t Flags);
Delphi
function fntTranslateString(var Stack: TPDFStack; Buffer: PWideChar; Size, Flags: Cardinal): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
Stack | TPDFStack* | A stack previously filled by pdfGetPageText. |
Buffer | PWideChar | Destination buffer. |
Size | Cardinal | Buffer capacity in characters (including the NUL terminator). |
Flags | Cardinal | Accepted for ABI compatibility; not read by this implementation. |
Return value — Number of characters copied (excluding the NUL terminator); 0 if Stack.Text/Buffer is NULL or Size is 0.
See also — pdfGetPageText
C# (P/Invoke)
wrappers/dotnet/LumasPdf.cs
public static extern int fntTranslateString(ref TPDFStack Stack, IntPtr Buffer, uint Size, uint Flags);
Area
Fonts
Category
Font Services
Exported names
fntTranslateString
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.