| Category | Interactive text selection |
|---|
Purpose — Read the text pointer/length out of an already-populated TTextSelection record.
Description — A pure accessor — does not take a Ctx and performs no lookup of its own; it just echoes SelText.TextOP/TextLen back out. Only useful on a SelText previously filled by psrFindText.
Declarations
C
BOOL32 __stdcall psrGetSelText(PPDF IPDF, TTextSelection* SelText, const wchar_t* Text, int32_t* TextLen);
Delphi
function psrGetSelText(const IPDF: PPDF; var SelText: TTextSelection; var Text: PWideChar; var TextLen: Integer): LongBool; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Accepted but not used to look anything up — the whole result comes from SelText. |
SelText | TTextSelection | A selection previously filled by psrFindText. |
Text | PWideChar* | Receives SelText.TextOP. |
TextLen | Integer* | Receives SelText.TextLen. |
Return value — TRUE if SelText.TextOP is non-NULL; FALSE if the selection is empty/uninitialized.
See also — psrFindText
C# (P/Invoke)
wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Text
Category
Misc
Exported names
psrGetSelText
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.