PDFium Component Docs

פונקציית BuildSpokenTextFromWords

Unit: PDFium
בונה מקטע TPdfSpokenText מטווח רציף של TPdfWordBox

Syntax

function BuildSpokenTextFromWords(const Words: TPdfWordBoxes; FirstWord, LastWord: Integer): TPdfSpokenText;

Parameters

WordsTPdfWordBoxes - תיבות מילים מדף או ממציג
FirstWordInteger - אינדקס המילה הראשון מבוסס-אפס, מוגבל ל-0
LastWordInteger - אינדקס המילה האחרון מבוסס-אפס, מוגבל ל-High(Words)

Return Value

TPdfSpokenText שה-Text שלו מוכן למנוע דיבור ושה-Spans שלו ממפה כל מילה בחזרה לטקסט הדף

Description

העוזר עובר על טווח TPdfWordBox הנבחר ומוסיף כל מילה עם SpokenTextAppend

טבלת הטווחים שנוצרת שומרת את מספר הדף, אינדקס תו המקור וספירת תווי המקור של כל מילה כך שניתן יהיה לתרגם היסט של מנוע דיבור בחזרה לדף ה-PDF

Remarks

Example

Words := Pdf1.PageWordBoxes;
Spoken := BuildSpokenTextFromWords(Words, 0, High(Words));

See Also

TPdf.PageWordBoxes, TPdfView.PageWordBoxes, SpokenToPageChar