PDFium Component Docs

TPdfWordBox record

Unit: PDFium
Holds one word together with its FTextPage character range, page-space rectangle and one-based page number

Syntax

type TPdfWordBox = record ... end;

Fields

FieldTypePurpose
TextWStringWord text
StartIndexIntegerZero-based FTextPage character index
CountIntegerNumber of characters in the word
RectTPdfRectanglePage-space union of the word character boxes
PageIntegerOne-based page number

Description

Word boxes split page text on whitespace, tabs, line breaks and NBSP characters

The component methods also merge FPDFText_GetCharBox rectangles into a single page-space TPdfRectangle for each word

Remarks

See Also

Text, SetReadingHighlight