PDFium Delphi Component Docs

TPdfReadingUnit-Record

Unit: PDFium
Speichert eine gesprochene Leseeinheit mit Text, semantischer Art, Seite, Hervorhebungsrechtecken, Quellindizes, Alternativtextstatus und Sprache

Syntax

type TPdfReadingUnit = record ... end;

Fields

FieldTypePurpose
TextWStringText to speak
KindTPdfContentFragmentKindSource TPdfContentFragmentKind
HeadingLevelIntegerHeading level 1..6 for headings, otherwise 0
PageIntegerOne-based page number
RectsTPdfRectanglesHighlight rectangles in page coordinates
FragmentIndexIntegerSource fragment index
SentenceIndexIntegerSentence index inside the fragment
IsAlternateTextBooleanTrue when Text came from Alt or ActualText
LanguageWStringLanguage tag for voice selection

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

See Also

ReadableContent, SetReadingHighlight