function BuildReadingUnits(const Fragments: TPdfContentFragments): TPdfReadingUnits;
| Fragments | TPdfContentFragments |
TPdfReadingUnitsReading 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
Each unit also retains its handle-free SourceFragment snapshot and TextStartIndex, a zero-based UTF-16 offset after leading whitespace is trimmed; repeated identical sentences therefore retain distinct source positions
TPdfView.SelectReadingUnit resolves that logical position to native PDFium character ranges and validates the snapshot before changing the selection
Units := BuildReadingUnits(Pdf1.DocumentReadableContent);