API referenceText

pdfGetPageText

Decode the currently active output page's text directly

CategoryText extraction (Lumas extension)

Purpose — Decode the currently active output page's text directly into a TPDFStack structure (a Lumas-specific convenience shape, not part of the reference ABI's normal calling pattern for this function name).

Description — Unlike pdfExtractText, this call takes no page number — it always operates on D.ActivePageIndex (the page currently open for editing) and only on output-side content; it does not fall back to an import source. Stack.Text receives the extracted Unicode text and Stack.Count the number of text-showing runs found.

Declarations

C
BOOL32 __stdcall pdfGetPageText(PPDF IPDF, TPDFStack* Stack);
Delphi
function pdfGetPageText(const IPDF: PPDF; var Stack: TPDFStack): LongBool; stdcall; external 'LumasPdf.dll';

TPDFStack (relevant fields; see V03 for the full record used elsewhere):

Delphi
TPDFStack = record
  // ...
  Text:  PWideChar;   // Lumas extension: engine-owned, valid until the next call
  Count: Cardinal;    // number of show-text runs found
end;

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle with an open (active) page.
StackTPDFStack*Receives Text/Count.

Return valueTRUE on success; FALSE if no page is currently active or its content can't be read.

See alsopdfExtractText

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Text
Category

Getters

Exported names

pdfGetPageText

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.