PDFiumPas 文件

BuildReadingUnits 函数

单元: PDFium
把 TPdfContentFragments 转换为句子级 TPdfReadingUnit 记录,不需要加载 pdfium.dll

Syntax

function BuildReadingUnits(const Fragments: TPdfContentFragments): TPdfReadingUnits;

Parameters

FragmentsTPdfContentFragments

Return Value

TPdfReadingUnits

Description

Reading units keep headings and figure alternate text whole, split paragraph text at sentence boundaries, preserve decimal points, and leave the reading cursor as a caller-owned array index

Use Rects with TPdfView.SetReadingHighlight and Language to coordinate visual highlighting with a TTS voice

Remarks

Example

Units := BuildReadingUnits(Pdf1.DocumentReadableContent);

See Also

ReadableContent, SetReadingHighlight