pdfGetLastTextOffset
Byte offset within the current page's content stream where the
| Category | Write-position tracking |
|---|---|
| Note | scoped 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
uint32_t __stdcall pdfGetLastTextOffset(PPDF IPDF);
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)
public static extern uint pdfGetLastTextOffset(IntPtr IPDF);
Getters
pdfGetLastTextOffset
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.