NewTextFlow
Text, Layout
Description
Creates a flow that carries one passage across boxes, columns, and pages
Syntax
Delphi
Function TPDFlib.NewTextFlow(Const Text: WideString): Integer;ActiveX
Function PDFlib::NewTextFlow(Text As String) As LongDLL
int DLNewTextFlow(int InstanceID, const wchar_t* Text);
int DLNewTextFlowA(int InstanceID, const char* Text);Parameters
| Text | The complete passage to lay out |
|---|
Return values
| Handle | TextFlow handle to release with ReleaseTextFlow |
|---|---|
| 0 | The text is empty |
Remarks
Hard line breaks include CR, LF, CRLF, Unicode NEL, LINE SEPARATOR and PARAGRAPH SEPARATOR. Common Unicode spaces take part in word wrapping, and ZERO WIDTH SPACE provides an invisible break opportunity without inserting a hyphen
NO-BREAK SPACE, NARROW NO-BREAK SPACE, WORD JOINER and the legacy zero-width no-break character keep their containing token together; a token wider than an otherwise empty line may overflow rather than being forcibly split. The source passage and its UTF-16 cursor offsets remain unchanged, whilst soft hyphens and invisible break or join controls are omitted from unbroken display text
Emergency wrapping and drop caps preserve surrogate pairs, the supported combining-mark ranges, emoji modifiers, paired regional indicators, explicit zero-width-joiner sequences, emoji tag sequences and supplementary variation selectors. This bounded cluster handling is not a complete Unicode grapheme or line-breaking implementation
The flow retains a cursor at the first character not yet placed, allowing each drawing call to continue exactly where the preceding box or column stopped
A new flow inherits the selected document language for automatic hyphenation when that language is supported