pdfSetOnPageBreakProc
Register a callback invoked whenever flowed/continued text
BOOL32 __stdcall pdfSetOnPageBreakProc(PPDF IPDF, void* Data, TOnPageBreakProc OnBreakProc);
function pdfSetOnPageBreakProc(const IPDF: PPDF; Data: Pointer; OnBreakProc: TOnPageBreakProc): LongBool; stdcall;
Purpose. Register a callback invoked whenever flowed/continued text writing (e.g. pdfBeginContinueText, Core Text Output) triggers an automatic page break — the callback can inspect the break position and return False to suppress the automatic break.
Description. Real and, per an inline source comment, was itself previously a documented gap: "cdecl TOnPageBreakProc callback... Was never invoked before" — confirming the callback is now genuinely fired at the actual page-break decision point (passing Data, the X position, current Y, and a fixed True continuation flag), with the callback's return value (<> 0) able to influence the break.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Data | Opaque user data passed through to every callback invocation. |
OnBreakProc | The callback; nil disables it. |
Return value. True if IPDF is valid.
See also. pdfBeginContinueText.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSetOnPageBreakProc
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.