PDFium Delphi Component 文件

NextReadingUnitOfKind 函式

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

Syntax

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

Parameters

UnitsTPdfReadingUnits
CurrentIndexInteger
KindTPdfContentFragmentKind
GoForwardBoolean

Return Value

Integer

Description

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

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

Remarks

Example

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

See Also

ReadableContent, SetReadingHighlight