API referenceText

psrGetSelText

Read the text pointer/length out of an already-populated

CategoryInteractive 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

ParameterTypeDescription
IPDFPPDFAccepted but not used to look anything up — the whole result comes from SelText.
SelTextTTextSelectionA selection previously filled by psrFindText.
TextPWideChar*Receives SelText.TextOP.
TextLenInteger*Receives SelText.TextLen.

Return valueTRUE if SelText.TextOP is non-NULL; FALSE if the selection is empty/uninitialized.

See alsopsrFindText

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.