PDFium Component Docs

SpokenTextAppend procedure

Unit: PDFium
Додає один зіставлений фрагмент усного тексту до фрагмента TPdfSpokenText

Syntax

procedure SpokenTextAppend(var Spoken: TPdfSpokenText; const SpokenPart: WString; Page, StartIndex: Integer; SourceCount: Integer = -1);

Parameters

SpokenTPdfSpokenText - Chunk that receives the spoken text and span entry
SpokenPartWString - Text run passed to the speech engine
PageInteger - One-based source page number
StartIndexInteger - Zero-based FTextPage source character index
SourceCountInteger - Source character count, or -1 to use the spoken run length

Description

SpokenTextAppend adds SpokenPart to Spoken.Text and records a TPdfSpokenSpan that maps the spoken offset back to page text

When Spoken.Text already has content the helper inserts one separator space before the new run; that separator is intentionally unmapped

Remarks

Example

Spoken.Text := '';
Spoken.Spans := nil;
SpokenTextAppend(Spoken, UnitText, 1, UnitStart, UnitLength);

See Also

TPdfSpokenText, SpokenToPageChar, BuildSpokenTextFromWords