TPdfSpokenText 區塊procedure SpokenTextAppend(var Spoken: TPdfSpokenText; const SpokenPart: WString; Page, StartIndex: Integer; SourceCount: Integer = -1);
| Spoken | TPdfSpokenText - 接收朗讀文字與跨距項目的區塊 |
| SpokenPart | WString - 傳遞給語音引擎的文字連續段 |
| Page | Integer - 從 1 起始的來源頁碼 |
| StartIndex | Integer - 從 0 起始的 FTextPage 來源字元索引 |
| SourceCount | Integer - 來源字元計數,或 -1 以使用朗讀連續段長度 |
SpokenTextAppend 會將 SpokenPart 新增至 Spoken.Text,並記錄一個將朗讀位移對應回頁面文字的 TPdfSpokenSpan
當 Spoken.Text 已有內容時,輔助函式會在新連續段前插入一個分隔空格;該分隔符號是刻意不對應的
Spoken.Text := '';
Spoken.Spans := nil;
SpokenTextAppend(Spoken, UnitText, 1, UnitStart, UnitLength);