type TPdfReadingUnit = record ... end;
| Field | Type | Purpose |
|---|---|---|
Text | WString | Text to speak |
Kind | TPdfContentFragmentKind | Source TPdfContentFragmentKind |
HeadingLevel | Integer | Heading level 1..6 for headings, otherwise 0 |
Page | Integer | One-based page number |
Rects | TPdfRectangles | Highlight rectangles in page coordinates |
FragmentIndex | Integer | Source fragment index |
SentenceIndex | Integer | Sentence index inside the fragment |
IsAlternateText | Boolean | True when Text came from Alt or ActualText |
Language | WString | Language tag for voice selection |
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