PDFium Delphi Component Docs

NextReadingUnitOfKind 函式

單元: PDFium
尋找下一個或上一個 Kind 符合指定 TPdfContentFragmentKind 的 TPdfReadingUnit

語法

function NextReadingUnitOfKind(const Units: TPdfReadingUnits; CurrentIndex: Integer; Kind: TPdfContentFragmentKind; GoForward: Boolean): Integer;

參數

UnitsTPdfReadingUnits
CurrentIndexInteger
KindTPdfContentFragmentKind
GoForwardBoolean

傳回值

Integer

說明

閱讀單元會將標題與圖片替代文字保持完整,在句子邊界切分段落文字,保留小數點,並將閱讀游標保留為呼叫端持有的陣列索引

搭配 TPdfView.SetReadingHighlight 使用 Rects,並以 Language 協調視覺突顯與 TTS 語音

備註

範例

Index := NextReadingUnitOfKind(Units, Index, cfHeading, True);

另請參閱

ReadableContent, SetReadingHighlight