SetTextFlowPaginationLines
Text, Layout
Description
Sets independent minimum line counts at the bottom of the current box and the top of the next box
Syntax
Delphi
Function TPDFlib.SetTextFlowPaginationLines(FlowID, OrphanLines, WidowLines: Integer): Integer;ActiveX
Function PDFlib::SetTextFlowPaginationLines(FlowID As Long, OrphanLines As Long, WidowLines As Long) As LongDLL
int DLSetTextFlowPaginationLines(int InstanceID, int FlowID, int OrphanLines, int WidowLines);Parameters
FlowID- Text flow handle returned by
NewTextFlow OrphanLines- Fewest lines accepted at the bottom of an incomplete box or column
WidowLines- Fewest lines preserved for the top of the next box or column
Return values
Returns 1 when the flow is valid and both minimums are at least 1, or 0 without changing either value
Remarks
Both limits default to 1 and apply only when a box would split the remaining flow
If the tentative tail is shorter than WidowLines, the required number of candidate lines moves to the next box while at least OrphanLines remain in the current box
If no split can satisfy both limits, the draw call returns 0 and leaves the flow cursor unchanged so the caller can offer a larger region
Pagination caches the current candidate line ends and measures at most the configured widow window beyond the split, avoiding a second layout of the whole remaining flow
See also
SetTextFlowMinLines, DrawTextFlow, DrawTextFlowColumns, MeasureTextFlow