API referenceText

pdfGetLastTextOffset

Byte offset within the current page's content stream where the

CategoryWrite-position tracking
Notescoped to pdfWriteText/Ex only (see Remarks)

Purpose — Byte offset within the current page's content stream where the most recent text-showing operator was written.

Declarations

C
uint32_t __stdcall pdfGetLastTextOffset(PPDF IPDF);
Delphi
function pdfGetLastTextOffset(const IPDF: PPDF): Cardinal; stdcall; external 'LumasPdf.dll';

Return value — Byte offset (content-stream size at the moment the show operator was about to be written); 0 if no qualifying write has occurred yet or the handle is invalid.

Remarks — Updated only by pdfWriteText/Ex — confirmed by tracing every assignment site of the backing field, all four of which are inside WriteTextA/WriteTextW. Writing via pdfWriteFText, pdfWriteTextMatrix, or pdfWriteAngleText does not update this value — the same scope limitation documented for underline drawing in E02.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern uint pdfGetLastTextOffset(IntPtr IPDF);
Area
Text
Category

Getters

Exported names

pdfGetLastTextOffset

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.